added pathname to url-helper
This commit is contained in:
11
dist/index.js
vendored
11
dist/index.js
vendored
@@ -36008,17 +36008,14 @@ function getFetchUrl(settings) {
|
||||
return `git@${serviceUrl.hostname}:${encodedOwner}/${encodedName}.git`;
|
||||
}
|
||||
// "origin" is SCHEME://HOSTNAME[:PORT]
|
||||
return `${serviceUrl.origin}/${encodedOwner}/${encodedName}`;
|
||||
return `${serviceUrl.origin}${serviceUrl.pathname}${encodedOwner}/${encodedName}`;
|
||||
}
|
||||
exports.getFetchUrl = getFetchUrl;
|
||||
function getServerUrl() {
|
||||
// todo: remove GITHUB_URL after support for GHES Alpha is no longer needed
|
||||
// return new URL(
|
||||
// process.env['GITHUB_SERVER_URL'] + '/gitea' ||
|
||||
// process.env['GITHUB_URL'] + '/gitea' ||
|
||||
// 'https://github.com'
|
||||
// )
|
||||
return new url_1.URL('https://dev.hargassner.at/gitea');
|
||||
return new url_1.URL(process.env['GITHUB_SERVER_URL'] ||
|
||||
process.env['GITHUB_URL'] ||
|
||||
'https://github.com');
|
||||
}
|
||||
exports.getServerUrl = getServerUrl;
|
||||
|
||||
|
||||
@@ -16,15 +16,14 @@ export function getFetchUrl(settings: IGitSourceSettings): string {
|
||||
}
|
||||
|
||||
// "origin" is SCHEME://HOSTNAME[:PORT]
|
||||
return `${serviceUrl.origin}/${encodedOwner}/${encodedName}`
|
||||
return `${serviceUrl.origin}${serviceUrl.pathname}${encodedOwner}/${encodedName}`
|
||||
}
|
||||
|
||||
export function getServerUrl(): URL {
|
||||
// todo: remove GITHUB_URL after support for GHES Alpha is no longer needed
|
||||
// return new URL(
|
||||
// process.env['GITHUB_SERVER_URL'] + '/gitea' ||
|
||||
// process.env['GITHUB_URL'] + '/gitea' ||
|
||||
// 'https://github.com'
|
||||
// )
|
||||
return new URL('https://dev.hargassner.at/gitea')
|
||||
return new URL(
|
||||
process.env['GITHUB_SERVER_URL'] ||
|
||||
process.env['GITHUB_URL'] ||
|
||||
'https://github.com'
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user