mirror of
https://gitea.com/actions/checkout.git
synced 2024-12-22 15:25:46 +01:00
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>
This commit is contained in:
parent
cd7d8d697e
commit
9b92a3558d
2 changed files with 2 additions and 4 deletions
3
dist/index.js
vendored
3
dist/index.js
vendored
|
@ -2402,8 +2402,7 @@ function getFetchUrl(settings) {
|
|||
if (settings.sshKey) {
|
||||
return `git@${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) {
|
||||
|
|
|
@ -15,8 +15,7 @@ export function getFetchUrl(settings: IGitSourceSettings): string {
|
|||
return `git@${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 {
|
||||
|
|
Loading…
Reference in a new issue