From e3a2e1f2a6cb449af5aa9600a7e0ab563c9c6d9a Mon Sep 17 00:00:00 2001 From: eric sciple Date: Sat, 16 May 2020 13:48:43 -0400 Subject: [PATCH] switch GITHUB_URL to GITHUB_SERVER_URL --- dist/index.js | 5 ++++- src/url-helper.ts | 7 ++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 2369bfc01..0074e0af6 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1400,7 +1400,10 @@ function getFetchUrl(settings) { } exports.getFetchUrl = getFetchUrl; 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; diff --git a/src/url-helper.ts b/src/url-helper.ts index 31848c7bc..05f1cbd67 100644 --- a/src/url-helper.ts +++ b/src/url-helper.ts @@ -20,5 +20,10 @@ export function getFetchUrl(settings: IGitSourceSettings): string { } 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' + ) }