mirror of
https://github.com/actions/checkout.git
synced 2026-05-27 00:12:52 +00:00
Merge 2cc0dd4921 into 0c366fd6a8
This commit is contained in:
Vendored
+2
-1
@@ -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
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user