Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switch GITHUB_URL to GITHUB_SERVER_URL #248

Merged
merged 1 commit into from May 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion dist/index.js
Expand Up @@ -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;

Expand Down
7 changes: 6 additions & 1 deletion src/url-helper.ts
Expand Up @@ -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'
)
}