mirror of
https://github.com/actions/checkout.git
synced 2026-06-19 18:57:20 +08:00
Merge c974278bdf529a68cf235c27ba685ec7e2bf968c into f9e715a95fcd1f9253f77dd28f11e88d2d6460c7
This commit is contained in:
commit
44f3c115d6
3
dist/index.js
vendored
3
dist/index.js
vendored
@ -2892,7 +2892,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';
|
||||
|
||||
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user