Skip to content

Commit

Permalink
tried with new method
Browse files Browse the repository at this point in the history
  • Loading branch information
Bullrich committed Feb 21, 2024
1 parent d16e9fb commit c025911
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/review-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ jobs:
run: |
echo "SENDER: $SENDER ; AUTHOR:$AUTHOR ; ACTION:$ACTION"
echo "::error::Project needs to be reviewed again"
gh api repos/${{ github.repository }}/pulls/${{ github.event.number }}/reviews \
--jq '.[] | select(.state == "APPROVED") | .user.login' \
| xargs -I '{}' gh api --method=POST \
repos/${{ github.repository }}/pulls/${{ github.event.number }}/requested_reviewers/'{}'/
REVIEWERS=$(gh api repos/${{ github.repository }}/pulls/${{ github.event.number }}/reviews \
--jq '.[] | select(.state == "APPROVED") | .user.login')
echo "Requesting reviewers: $REVIEWERS"
gh api repos/${{ github.repository }}/pulls/${{ github.event.number }}/requested_reviewers/ \
-f "reviewers=$REVIEWERS"
exit 1
env:
SENDER: ${{ github.event.sender.login }}
Expand Down

0 comments on commit c025911

Please sign in to comment.