Skip to content
Snippets Groups Projects
Commit 88a13f3a authored by Rhys Arkins's avatar Rhys Arkins
Browse files

fix: loosen default github endpoint check

parent 8da5888e
No related branches found
No related tags found
No related merge requests found
......@@ -14,7 +14,7 @@ async function getDependency(purl, config) {
// istanbul ignore if
if (
process.env.GITHUB_ENDPOINT &&
process.env.GITHUB_ENDPOINT !== 'https://api.github.com/'
!process.env.GITHUB_ENDPOINT.startsWith('https://api.github.com')
) {
logger.debug('Removing GHE token before retrieving node releases');
endpoint = process.env.GITHUB_ENDPOINT;
......
......@@ -34,7 +34,7 @@ async function getChangeLogJSON(args) {
if (
process.env.GITHUB_ENDPOINT &&
process.env.GITHUB_ENDPOINT !== 'https://api.github.com/'
!process.env.GITHUB_ENDPOINT.startsWith('https://api.github.com')
) {
const parsedEndpoint = url.parse(process.env.GITHUB_ENDPOINT);
gheBaseURL = `${parsedEndpoint.protocol}//${parsedEndpoint.hostname}/`;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment