Skip to content

Commit cf79f6e

Browse files
committed
test q
1 parent 7f1d20f commit cf79f6e

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

.github/workflows/pull_request.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
name: Pull Request
2-
31
on:
42
pull_request_review:
53
types: [submitted]
@@ -12,7 +10,7 @@ jobs:
1210
- name: Count Approved Reviews
1311
run: |
1412
APPROVED_COUNT=$(gh api repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/reviews \
15-
--jq '[.[] | select(.state == "APPROVED")] | length')
13+
--jq 'group_by(.user.login) | map(last) | map(select(.state == "APPROVED")) | length')
1614
1715
echo "Number of Approved Reviews: $APPROVED_COUNT"
1816
@@ -22,4 +20,4 @@ jobs:
2220
echo "PR has only $APPROVED_COUNT approved reviews. Waiting for more approvals."
2321
fi
2422
env:
25-
GH_TOKEN: ${{ secrets.SUPER_SECRET }}
23+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)