diff --git a/lib/datasource/github.js b/lib/datasource/github.js index ab1e6664d449698257ebc46eab80b13504e3907e..81f149385464a5c7aaff8ad6f7ba4722a93fe3a6 100644 --- a/lib/datasource/github.js +++ b/lib/datasource/github.js @@ -12,7 +12,10 @@ async function getDependency(purl, config) { let endpoint; let token; // istanbul ignore if - if (process.env.GITHUB_ENDPOINT) { + if ( + process.env.GITHUB_ENDPOINT && + process.env.GITHUB_ENDPOINT !== 'https://api.github.com/' + ) { logger.debug('Removing GHE token before retrieving node releases'); endpoint = process.env.GITHUB_ENDPOINT; delete process.env.GITHUB_ENDPOINT; diff --git a/lib/workers/pr/changelog/index.js b/lib/workers/pr/changelog/index.js index 4517b9c95aebc74a1b68dfb46e9e7b8968b22cc2..9bd8fc00c74b20de742d9a420c795e4a5d5bb524 100644 --- a/lib/workers/pr/changelog/index.js +++ b/lib/workers/pr/changelog/index.js @@ -32,7 +32,10 @@ async function getChangeLogJSON(args) { let gheBaseURL; let githubBaseURL = 'https://github.com/'; - if (process.env.GITHUB_ENDPOINT) { + if ( + process.env.GITHUB_ENDPOINT && + process.env.GITHUB_ENDPOINT !== 'https://api.github.com/' + ) { const parsedEndpoint = url.parse(process.env.GITHUB_ENDPOINT); gheBaseURL = `${parsedEndpoint.protocol}//${parsedEndpoint.hostname}/`; if (repositoryUrl.startsWith(gheBaseURL)) {