From c02591103d07010e6fe744045984836c53f77206 Mon Sep 17 00:00:00 2001 From: Javier Bullrich Date: Wed, 21 Feb 2024 15:25:44 +0100 Subject: [PATCH] tried with new method --- .github/workflows/review-trigger.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/review-trigger.yml b/.github/workflows/review-trigger.yml index 4506209e88018..89bba710765dd 100644 --- a/.github/workflows/review-trigger.yml +++ b/.github/workflows/review-trigger.yml @@ -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 }}