(remote: string)
| 420 | } |
| 421 | |
| 422 | function normalizeGitHubRemote(remote: string) { |
| 423 | const trimmed = remote.trim().replace(/\.git$/, "") |
| 424 | const sshMatch = trimmed.match(/^git@github\.com:(.+\/.+)$/) |
| 425 | const sshUrlMatch = trimmed.match(/^ssh:\/\/git@github\.com\/(.+\/.+)$/) |
| 426 | const httpsMatch = trimmed.match(/^https:\/\/github\.com\/(.+\/.+)$/) |
| 427 | const repoPath = sshMatch?.[1] ?? sshUrlMatch?.[1] ?? httpsMatch?.[1] |
| 428 | |
| 429 | return repoPath ? `https://github.com/${repoPath}` : undefined |
| 430 | } |
| 431 | |
| 432 | function formatCloudRepository(repository: CloudRepository) { |
| 433 | return repository.startingRef |
no outgoing calls
no test coverage detected