Skip to content

Commit

Permalink
Merge pull request #1446 from hborawski/all-contributors-auth
Browse files Browse the repository at this point in the history
fix: use GH_TOKEN if PRIVATE_TOKEN is not set
  • Loading branch information
hipstersmoothie committed Aug 7, 2020
2 parents 57c79b5 + 965ff57 commit dcba1e9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions plugins/all-contributors/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,12 @@ export default class AllContributorsPlugin implements IPlugin {
didUpdate = true;
auto.logger.log.info(`Adding "${username}"'s contributions...`);

// If a PRIVATE_TOKEN is not set for all-contributors-cli
// use the GH_TOKEN
if (process.env.PRIVATE_TOKEN === undefined) {
process.env.PRIVATE_TOKEN = process.env.GH_TOKEN
}

// Update/add contributor in RC file
const { contributors } = await addContributor(
config,
Expand Down

0 comments on commit dcba1e9

Please sign in to comment.