From 88a13f3ab9196e3b5d6ed13ff12b02e162c0843b Mon Sep 17 00:00:00 2001 From: Rhys Arkins <rhys@arkins.net> Date: Tue, 26 Jun 2018 14:44:54 +0200 Subject: [PATCH] fix: loosen default github endpoint check --- lib/datasource/github.js | 2 +- lib/workers/pr/changelog/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/datasource/github.js b/lib/datasource/github.js index 81f1493854..4418198c11 100644 --- a/lib/datasource/github.js +++ b/lib/datasource/github.js @@ -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; diff --git a/lib/workers/pr/changelog/index.js b/lib/workers/pr/changelog/index.js index 9bd8fc00c7..4815ac7b51 100644 --- a/lib/workers/pr/changelog/index.js +++ b/lib/workers/pr/changelog/index.js @@ -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}/`; -- GitLab