From a8227af31c22577f434a42fcf8d81dbc01eaf822 Mon Sep 17 00:00:00 2001 From: SirWindfield Date: Sat, 13 Feb 2021 17:25:11 +0100 Subject: [PATCH] feat: add namespaced token (#296) * feat: add namespaced token This commit adds the possibility to specify the private token via the ALL_CONTRIBUTORS_PRIVATE_TOKEN environment variable. If the environment variable is not set it will fall back to the previous behavior and check for PRIVATE_TOKEN instead. Closes #294 * style: remove irregular whitespace * refactor: remove unneeded parenthesis --- src/repo/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/repo/index.js b/src/repo/index.js index 808d70b4..3ff5492a 100644 --- a/src/repo/index.js +++ b/src/repo/index.js @@ -1,7 +1,7 @@ const githubAPI = require('./github') const gitlabAPI = require('./gitlab') -const privateToken = (process.env && process.env.PRIVATE_TOKEN) || '' +const privateToken = (process.env && (process.env.ALL_CONTRIBUTORS_PRIVATE_TOKEN || process.env.PRIVATE_TOKEN)) || '' const SUPPORTED_REPO_TYPES = { github: { value: 'github',