This commit is contained in:
Ansis Māliņš
2026-04-11 12:57:25 +02:00
committed by GitHub
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -2731,7 +2731,8 @@ function getFetchUrl(settings) {
return `${user}@${serviceUrl.hostname}:${encodedOwner}/${encodedName}.git`;
}
// "origin" is SCHEME://HOSTNAME[:PORT]
return `${serviceUrl.origin}/${encodedOwner}/${encodedName}`;
const rootUrl = serviceUrl.origin + serviceUrl.pathname.replace(/\/$/, '');
return `${rootUrl}/${encodedOwner}/${encodedName}`;
}
function getServerUrl(url) {
let resolvedUrl = process.env['GITHUB_SERVER_URL'] || 'https://github.com';
+2 -1
View File
@@ -17,7 +17,8 @@ export function getFetchUrl(settings: IGitSourceSettings): string {
}
// "origin" is SCHEME://HOSTNAME[:PORT]
return `${serviceUrl.origin}/${encodedOwner}/${encodedName}`
const rootUrl = serviceUrl.origin + serviceUrl.pathname.replace(/\/$/, '')
return `${rootUrl}/${encodedOwner}/${encodedName}`
}
export function getServerUrl(url?: string): URL {