Skip to content

Commit 20dad04

Browse files
committed
update actions use curl to get approval status
1 parent b22cb68 commit 20dad04

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/learn-github-actions.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
- name: Wait for approval
4141
run: |
4242
while true; do
43-
status=$(gh pr view $PR_NUMBER --json reviews | jq -r '.reviews[] | select(.state == "APPROVED")')
43+
status=$(curl -H "Authorization: token $GH_TOKEN" -s https://api.github.com/repos/$GITHUB_REPOSITORY/pulls/$PR_NUMBER/reviews | jq -r '.[] | select(.state == "APPROVED")')
4444
if [ "$status" != "" ]; then
4545
break
4646
fi

0 commit comments

Comments
 (0)