0
0
Fork 0
mirror of https://github.com/actions/checkout.git synced 2024-11-22 06:06:20 +01:00

switch GITHUB_URL to GITHUB_SERVER_URL (#248)

This commit is contained in:
eric sciple 2020-05-18 13:05:15 -04:00 committed by GitHub
parent ac455590d1
commit 7523e23789
Failed to generate hash of commit
2 changed files with 10 additions and 2 deletions

5
dist/index.js vendored
View file

@ -1400,7 +1400,10 @@ function getFetchUrl(settings) {
} }
exports.getFetchUrl = getFetchUrl; exports.getFetchUrl = getFetchUrl;
function getServerUrl() { function getServerUrl() {
return new url_1.URL(process.env['GITHUB_URL'] || 'https://github.com'); // todo: remove GITHUB_URL after support for GHES Alpha is no longer needed
return new url_1.URL(process.env['GITHUB_SERVER_URL'] ||
process.env['GITHUB_URL'] ||
'https://github.com');
} }
exports.getServerUrl = getServerUrl; exports.getServerUrl = getServerUrl;

View file

@ -20,5 +20,10 @@ export function getFetchUrl(settings: IGitSourceSettings): string {
} }
export function getServerUrl(): URL { export function getServerUrl(): URL {
return new URL(process.env['GITHUB_URL'] || 'https://github.com') // todo: remove GITHUB_URL after support for GHES Alpha is no longer needed
return new URL(
process.env['GITHUB_SERVER_URL'] ||
process.env['GITHUB_URL'] ||
'https://github.com'
)
} }