Skip to content

Commit

Permalink
chore: fix auto-approve workflow (aws#3814)
Browse files Browse the repository at this point in the history
The condition could only pass for `pull_request` events. For most auto-approve PRs though this workflow would be triggered by `labeled` event, which requires a different condition.



---

By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license].

[Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
  • Loading branch information
corymhall authored Oct 24, 2022
1 parent b7141e3 commit fb278c0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/auto-approve.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ on:

jobs:
auto-approve:
if: contains(github.event.pull_request.labels.*.name, 'auto-approve')
if: |
contains(github.event.pull_request.labels.*.name, 'auto-approve') ||
github.event.label.name == 'auto-approve'
permissions:
actions: write
pull-requests: write
Expand Down

0 comments on commit fb278c0

Please sign in to comment.