diff --git a/lib/config/env.js b/lib/config/env.js index 31fcc42e484ce95f54838ffbb522ff07c445132e..242780a0eaef5273d0bae7d4642b55408d9f9450 100644 --- a/lib/config/env.js +++ b/lib/config/env.js @@ -104,6 +104,7 @@ function getConfig(env) { config.endpoint = env.GITHUB_ENDPOINT; } + /* eslint-disable no-param-reassign */ delete env.GITHUB_TOKEN; delete env.GITHUB_ENDPOINT; delete env.GITHUB_COM_TOKEN; diff --git a/test/config/__snapshots__/env.spec.js.snap b/test/config/__snapshots__/env.spec.js.snap index d25dd537d76060570ef40788efa349441459d80b..ac948687ec5a0924cbe4a1609efda12bd85344ed 100644 --- a/test/config/__snapshots__/env.spec.js.snap +++ b/test/config/__snapshots__/env.spec.js.snap @@ -37,17 +37,17 @@ exports[`config/env .getConfig(env) supports GitHub custom endpoint and github.c Object { "endpoint": "a ghe endpoint", "endpoints": Array [ - Object { - "endpoint": "https://api.github.com/", - "platform": "github", - "token": "a github.com token", - }, Object { "default": true, "endpoint": "a ghe endpoint", "platform": "github", "token": "a ghe token", }, + Object { + "endpoint": "https://api.github.com/", + "platform": "github", + "token": "a github.com token", + }, ], } `; @@ -56,17 +56,17 @@ exports[`config/env .getConfig(env) supports GitHub custom endpoint and github.c Object { "endpoint": "a ghe endpoint", "endpoints": Array [ - Object { - "endpoint": "https://api.github.com/", - "platform": "github", - "token": "a github.com token", - }, Object { "default": true, "endpoint": "a ghe endpoint", "platform": "github", "token": "a ghe token", }, + Object { + "endpoint": "https://api.github.com/", + "platform": "github", + "token": "a github.com token", + }, Object { "endpoint": undefined, "platform": "gitlab",