0
1
Fork 0

Compare commits

...

2 Commits

Author SHA1 Message Date
You-Sheng Yang 0eb7bdecd1
Merge 9b92a3558d into 43045ae669 2024-04-24 10:23:18 +02:00
You-Sheng Yang 9b92a3558d getFetchUrl: compose url with full service url
actions/checkout maybe used by Gitea, which allows installing the
server instance in a subdirectory to the service root, therefore a full
serviceUrl must be used.

Signed-off-by: You-Sheng Yang <vicamo@gmail.com>
2024-03-22 00:08:33 +08:00
2 changed files with 2 additions and 4 deletions

3
dist/index.js vendored
View File

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

View File

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