(owner: Owner)
| 66 | */ |
| 67 | export function normalizeInstanceUrl(url?: string): string { |
| 68 | return normalizeGitLabInstanceUrl(url || DEFAULT_GITLAB_INSTANCE_URL); |
| 69 | } |
| 70 | |
| 71 | /** |
| 72 | * Returns true if the GitLab instance URL has changed between |
| 73 | * the existing integration and the new connection. |
| 74 | */ |
| 75 | export function instanceUrlChanged(existingUrl: string | undefined, newUrl: string): boolean { |
| 76 | const normalizedNewUrl = normalizeInstanceUrl(newUrl); |
| 77 | try { |
| 78 | return normalizeInstanceUrl(existingUrl) !== normalizedNewUrl; |
| 79 | } catch { |
| 80 | return true; |
| 81 | } |
| 82 | } |
| 83 | |
| 84 | function readOptionalMetadataString( |
no test coverage detected