Skip to content

Commit

Permalink
fix: change condition for hardcoded userId in github actions
Browse files Browse the repository at this point in the history
check for DANGER_GITHUB_API_TOKEN not present as it's priority is more if both it and GITHUB_TOKEN are present
  • Loading branch information
rohit-gohri committed Mar 6, 2020
1 parent 04c3345 commit c1fcff5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion source/platforms/github/GitHubAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,11 @@ export class GitHubAPI {
return parseInt(perilID)
}

const useGitHubActionsID = process.env["GITHUB_WORKFLOW"]
const useGitHubActionsID = process.env["GITHUB_WORKFLOW"] && !process.env["DANGER_GITHUB_API_TOKEN"]
if (useGitHubActionsID) {
// This is the user.id of the github-actions app(https://github.com/apps/github-actions)
// that is used to comment when using danger in Github Action
// with GITHUB_TOKEN (https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token)
return 41898282
}

Expand Down

0 comments on commit c1fcff5

Please sign in to comment.