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) { ...@@ -14,7 +14,7 @@ async function getDependency(purl, config) {
// istanbul ignore if // istanbul ignore if
if ( if (
process.env.GITHUB_ENDPOINT && 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'); logger.debug('Removing GHE token before retrieving node releases');
endpoint = process.env.GITHUB_ENDPOINT; endpoint = process.env.GITHUB_ENDPOINT;
......
...@@ -34,7 +34,7 @@ async function getChangeLogJSON(args) { ...@@ -34,7 +34,7 @@ async function getChangeLogJSON(args) {
if ( if (
process.env.GITHUB_ENDPOINT && 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); const parsedEndpoint = url.parse(process.env.GITHUB_ENDPOINT);
gheBaseURL = `${parsedEndpoint.protocol}//${parsedEndpoint.hostname}/`; 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