Skip to content

Commit 7523e23

Browse files
authored
switch GITHUB_URL to GITHUB_SERVER_URL (#248)
1 parent ac45559 commit 7523e23

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

dist/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1400,7 +1400,10 @@ function getFetchUrl(settings) {
14001400
}
14011401
exports.getFetchUrl = getFetchUrl;
14021402
function getServerUrl() {
1403-
return new url_1.URL(process.env['GITHUB_URL'] || 'https://github.com');
1403+
// todo: remove GITHUB_URL after support for GHES Alpha is no longer needed
1404+
return new url_1.URL(process.env['GITHUB_SERVER_URL'] ||
1405+
process.env['GITHUB_URL'] ||
1406+
'https://github.com');
14041407
}
14051408
exports.getServerUrl = getServerUrl;
14061409

src/url-helper.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,10 @@ export function getFetchUrl(settings: IGitSourceSettings): string {
2020
}
2121

2222
export function getServerUrl(): URL {
23-
return new URL(process.env['GITHUB_URL'] || 'https://github.com')
23+
// todo: remove GITHUB_URL after support for GHES Alpha is no longer needed
24+
return new URL(
25+
process.env['GITHUB_SERVER_URL'] ||
26+
process.env['GITHUB_URL'] ||
27+
'https://github.com'
28+
)
2429
}

0 commit comments

Comments
 (0)