(ref: string)
| 27 | * Returns the input unchanged for symbolic refs (branches, tags, etc.). |
| 28 | */ |
| 29 | export function truncateSha(ref: string): string { |
| 30 | const match = ref.match(/^([0-9a-f]{40})(.*)$/i); |
| 31 | if (match) { |
| 32 | return match[1].slice(0, 7) + match[2]; |
| 33 | } |
| 34 | return ref; |
| 35 | } |
| 36 | |
| 37 | /** |
| 38 | * Creates an invite link URL from the base URL and invite ID |
no outgoing calls
no test coverage detected