Skip to content

Commit

Permalink
fix: fix duplicate github token environment varible causing auth to fail
Browse files Browse the repository at this point in the history
  • Loading branch information
prototypicalpro committed Oct 6, 2020
1 parent 9567d76 commit c9110ba
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,9 @@ export default async function run(disableRetry?: boolean): Promise<void> {
// verify the label color is a color
if (!/[0-9a-fA-F]{6}/.test(LABEL_COLOR))
throw new Error(`Invalid label color ${LABEL_COLOR}`)
// override GITHUB_TOKEN and INPUT_GITHUB_TOKEN if TOKEN is present
// override GITHUB_TOKEN and INPUT_GITHUB_TOKEN if INPUT_TOKEN is present
if (TOKEN) {
delete process.env['INPUT_TOKEN']
delete process.env['INPUT_GITHUB_TOKEN']
process.env['GITHUB_TOKEN'] = TOKEN
}
Expand Down

0 comments on commit c9110ba

Please sign in to comment.