(pathname: string)
| 97 | } |
| 98 | |
| 99 | function githubRemote(pathname: string) { |
| 100 | const base = process.env.OPENCODE_REPO_CLONE_GITHUB_BASE_URL |
| 101 | if (!base) return `https://github.com/${pathname}.git` |
| 102 | return new URL(`${pathname}.git`, withSlash(base)).href |
| 103 | } |
| 104 | |
| 105 | function buildRemoteReference(input: { host: string; segments: string[]; remote?: string; protocol?: string }) { |
| 106 | const segments = input.segments.map(trimGitSuffix).filter(Boolean) |
no test coverage detected