This commit is contained in:
Pascal Weyprecht 2026-05-14 09:30:27 +00:00 committed by GitHub
commit 0ddd89002e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

3
dist/index.js vendored
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 serviceUrlBase = pruneSuffix(`${serviceUrl.origin}${serviceUrl.pathname}`, '/');
return `${serviceUrlBase}/${encodedOwner}/${encodedName}`;
}
function getServerUrl(url) {
let resolvedUrl = process.env['GITHUB_SERVER_URL'] || 'https://github.com';

View file

@ -17,7 +17,11 @@ export function getFetchUrl(settings: IGitSourceSettings): string {
}
// "origin" is SCHEME://HOSTNAME[:PORT]
return `${serviceUrl.origin}/${encodedOwner}/${encodedName}`
const serviceUrlBase = pruneSuffix(
`${serviceUrl.origin}${serviceUrl.pathname}`,
'/'
)
return `${serviceUrlBase}/${encodedOwner}/${encodedName}`
}
export function getServerUrl(url?: string): URL {