12
0
Fork 0
mirror of https://github.com/actions/checkout.git synced 2026-05-22 03:52:00 +00:00

allow for subpaths in GITHUB_SERVER_URL

This commit is contained in:
fx 2026-05-13 21:15:34 +02:00
parent 900f2210b1
commit 8e600906a0

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 {