mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-09-17 22:06:28 +00:00
Approve pull request only if not already approved (#883)
This commit is contained in:
@@ -17,7 +17,15 @@ jobs:
|
||||
|
||||
- name: Approve and label updates
|
||||
run: |
|
||||
gh pr review --approve "$PR_URL"
|
||||
review_status="$(
|
||||
gh pr view "$PR_URL" \
|
||||
--json="reviewDecision" \
|
||||
--jq=".reviewDecision"
|
||||
)"
|
||||
echo "Pull request review status: ${review_status}"
|
||||
if [[ "${review_status}" != "APPROVED" ]]; then
|
||||
gh pr review --approve "$PR_URL"
|
||||
fi
|
||||
gh pr edit --add-label "cleanup-no-release-required" "$PR_URL"
|
||||
env:
|
||||
PR_URL: ${{ github.event.pull_request.html_url }}
|
||||
|
||||
Reference in New Issue
Block a user