Skip to content

Commit

Permalink
added action to synchornize
Browse files Browse the repository at this point in the history
This stops the dismissal on different events and only executes it when the user pushes new commits to the PR
  • Loading branch information
Bullrich committed Oct 24, 2023
1 parent 89290d5 commit 45c9cf2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/review-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
jobs:
dismiss-reviews:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request_target' }}
if: ${{ github.event_name == 'pull_request_target' && github.event.action == 'synchronize' }}
steps:
- name: Dismiss Approvals
env:
Expand All @@ -24,7 +24,7 @@ jobs:
--jq '.[] | select(.state == "APPROVED") | .id' \
| xargs -I '{}' gh api --method=PUT -f message="Dismissed due to PR edit." \
repos/${{ github.repository }}/pulls/${{ github.event.number }}/reviews/'{}'/dismissals
trigger-review-bot:
runs-on: ubuntu-latest
name: trigger review bot
Expand Down

0 comments on commit 45c9cf2

Please sign in to comment.