mirror of
https://github.com/actions/checkout.git
synced 2026-04-14 07:46:53 +00:00
Merge 2cc0dd4921 into 0c366fd6a8
This commit is contained in:
commit
d098729bbc
2 changed files with 4 additions and 2 deletions
3
dist/index.js
vendored
3
dist/index.js
vendored
|
|
@ -2731,7 +2731,8 @@ function getFetchUrl(settings) {
|
||||||
return `${user}@${serviceUrl.hostname}:${encodedOwner}/${encodedName}.git`;
|
return `${user}@${serviceUrl.hostname}:${encodedOwner}/${encodedName}.git`;
|
||||||
}
|
}
|
||||||
// "origin" is SCHEME://HOSTNAME[:PORT]
|
// "origin" is SCHEME://HOSTNAME[:PORT]
|
||||||
return `${serviceUrl.origin}/${encodedOwner}/${encodedName}`;
|
const rootUrl = serviceUrl.origin + serviceUrl.pathname.replace(/\/$/, '');
|
||||||
|
return `${rootUrl}/${encodedOwner}/${encodedName}`;
|
||||||
}
|
}
|
||||||
function getServerUrl(url) {
|
function getServerUrl(url) {
|
||||||
let resolvedUrl = process.env['GITHUB_SERVER_URL'] || 'https://github.com';
|
let resolvedUrl = process.env['GITHUB_SERVER_URL'] || 'https://github.com';
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,8 @@ export function getFetchUrl(settings: IGitSourceSettings): string {
|
||||||
}
|
}
|
||||||
|
|
||||||
// "origin" is SCHEME://HOSTNAME[:PORT]
|
// "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 {
|
export function getServerUrl(url?: string): URL {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue