Skip to content

Commit

Permalink
feat: add namespaced token (#296)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
SirWindfield authored Feb 13, 2021
1 parent f1dc01d commit a8227af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/repo/index.js
Original file line number Diff line number Diff line change
@@ -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',
Expand Down

0 comments on commit a8227af

Please sign in to comment.