chore: hardcode fix getFetchUrl

This commit is contained in:
张泊明518370910136 2024-06-15 20:08:51 -04:00
parent 1e31de5234
commit 4c8f4bdc40
Signed by untrusted user: 张泊明518370910136
GPG Key ID: CA088E6D9284F870

View File

@ -12,11 +12,11 @@ export function getFetchUrl(settings: IGitSourceSettings): string {
const encodedOwner = encodeURIComponent(settings.repositoryOwner)
const encodedName = encodeURIComponent(settings.repositoryName)
if (settings.sshKey) {
return `git@${serviceUrl.hostname}:${encodedOwner}/${encodedName}.git`
return `git@${serviceUrl.hostname}:2222/${encodedOwner}/${encodedName}.git`
}
// "origin" is SCHEME://HOSTNAME[:PORT]
return `${serviceUrl.origin}/${encodedOwner}/${encodedName}`
return `${serviceUrl.origin}/git/${encodedOwner}/${encodedName}`
}
export function getServerUrl(url?: string): URL {