mirror of
https://gitea.com/actions/checkout.git
synced 2024-11-22 16:45:56 +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) {
|
if (settings.sshKey) {
|
||||||
return `git@${serviceUrl.hostname}:${encodedOwner}/${encodedName}.git`;
|
return `git@${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) {
|
||||||
|
|
|
@ -15,8 +15,7 @@ export function getFetchUrl(settings: IGitSourceSettings): string {
|
||||||
return `git@${serviceUrl.hostname}:${encodedOwner}/${encodedName}.git`
|
return `git@${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 {
|
||||||
|
|
Loading…
Reference in a new issue