diff --git a/lib/workers/pr/changelog/index.js b/lib/workers/pr/changelog/index.js
index f5f9887203327b5efb03ad7dbcd6c542e577f443..61a5d77d11a8327e19c679ad04e06ef9587a965b 100644
--- a/lib/workers/pr/changelog/index.js
+++ b/lib/workers/pr/changelog/index.js
@@ -26,15 +26,13 @@ async function getChangeLogJSON(args) {
   let token;
   let endpoint;
   let gheBaseURL;
-  const opts = {
-    githubBaseURL: 'https://github.com/',
-  };
+  let githubBaseURL = 'https://github.com/';
 
   if (process.env.GITHUB_ENDPOINT) {
     const parsedEndpoint = url.parse(process.env.GITHUB_ENDPOINT);
     gheBaseURL = `${parsedEndpoint.protocol}//${parsedEndpoint.hostname}/`;
     if (repositoryUrl.startsWith(gheBaseURL)) {
-      opts.githubBaseURL = gheBaseURL;
+      githubBaseURL = gheBaseURL;
     } else {
       // Switch tokens
       token = process.env.GITHUB_TOKEN;
@@ -48,7 +46,7 @@ async function getChangeLogJSON(args) {
     if (!res) {
       res = await sourceGithub.getChangeLogJSON({
         ...args,
-        ...opts,
+        githubBaseURL,
       });
       await sourceCache.setChangeLogJSON(args, res);
     }