Skip to content

Commit

Permalink
Allow approvals by @github-actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
reitermarkus committed Dec 9, 2020
1 parent 29335cb commit 29daf09
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ export function isAuthorAllowed(
pullRequestOrReview: PullRequest | Review,
authorAssociations: string[]
): boolean {
if (pullRequestOrReview.user?.login === 'github-actions[bot]') {
return true
}

if (!pullRequestOrReview.author_association) {
return false
}
Expand Down

0 comments on commit 29daf09

Please sign in to comment.