0
1
Fork 0
mirror of https://github.com/actions/checkout synced 2024-06-26 15:58:20 +02:00
This commit is contained in:
You-Sheng Yang 2024-05-02 17:54:06 +02:00 committed by GitHub
commit 5cdb2b1e10
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 4 deletions

3
dist/index.js vendored
View file

@ -2446,8 +2446,7 @@ function getFetchUrl(settings) {
const user = settings.sshUser.length > 0 ? settings.sshUser : 'git'; const user = settings.sshUser.length > 0 ? settings.sshUser : 'git';
return `${user}@${serviceUrl.hostname}:${encodedOwner}/${encodedName}.git`; return `${user}@${serviceUrl.hostname}:${encodedOwner}/${encodedName}.git`;
} }
// "origin" is SCHEME://HOSTNAME[:PORT] return `${serviceUrl}/${encodedOwner}/${encodedName}`;
return `${serviceUrl.origin}/${encodedOwner}/${encodedName}`;
} }
exports.getFetchUrl = getFetchUrl; exports.getFetchUrl = getFetchUrl;
function getServerUrl(url) { function getServerUrl(url) {

View file

@ -16,8 +16,7 @@ export function getFetchUrl(settings: IGitSourceSettings): string {
return `${user}@${serviceUrl.hostname}:${encodedOwner}/${encodedName}.git` return `${user}@${serviceUrl.hostname}:${encodedOwner}/${encodedName}.git`
} }
// "origin" is SCHEME://HOSTNAME[:PORT] return `${serviceUrl}/${encodedOwner}/${encodedName}`
return `${serviceUrl.origin}/${encodedOwner}/${encodedName}`
} }
export function getServerUrl(url?: string): URL { export function getServerUrl(url?: string): URL {