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
This commit is contained in:
SirWindfield 2021-02-13 17:25:11 +01:00 committed by GitHub
parent f1dc01d714
commit a8227af31c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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',