Skip to content

Commit

Permalink
update trigger condition
Browse files Browse the repository at this point in the history
  • Loading branch information
jaisnan committed Aug 22, 2024
1 parent 257f8bb commit 6cac23c
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/pr_approval.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,12 @@ name: Check PR Approvals
# To protect against that scenario, we can turn on number of approvals required to 2 in the github settings
# of the repository
on:
pull_request_review:
types: [submitted]
workflow_dispatch:

# Without these permissions, we get a 403 error from github
# for trying to modify the pull request for newer project.
# Source: https://stackoverflow.com/a/76994510
permissions: write-all
pull_request:
branches: [ main ]

jobs:
check-approvals:
if: github.event.review.state == 'APPROVED' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand Down

0 comments on commit 6cac23c

Please sign in to comment.