Skip to content

Commit

Permalink
renamed step
Browse files Browse the repository at this point in the history
  • Loading branch information
Bullrich committed Feb 21, 2024
1 parent 4c3b979 commit d9834f2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/review-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Skip merge queue
if: ${{ contains(github.ref, 'gh-readonly-queue') }}
run: exit 0
- name: Fail on non author pushing
- name: Fail when author pushes new code
# Require new reviews when the author is pushing and he is not a member
if: |
github.event.action == 'synchronize' &&
Expand All @@ -30,10 +30,12 @@ jobs:
run: |
echo "SENDER: $SENDER ; AUTHOR:$AUTHOR ; ACTION:$ACTION"
echo "::error::Project needs to be reviewed again"
# We get the list of reviewers who approved the PR
REVIEWERS=$(gh api repos/${{ github.repository }}/pulls/${{ github.event.number }}/reviews \
--jq '{reviewers: [.[] | select(.state == "APPROVED") | .user.login]}')
echo "Requesting reviewers: $REVIEWERS to repos/${{ github.repository }}/pulls/${{ github.event.number }}/requested_reviewers $R"
# We request them to review again
echo $REVIEWERS | gh api --method POST repos/${{ github.repository }}/pulls/${{ github.event.number }}/requested_reviewers --input -
exit 1
env:
Expand Down

0 comments on commit d9834f2

Please sign in to comment.