Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
svenklemm committed Oct 19, 2024
1 parent 2a5cbaa commit 74fc30f
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/pr-approvals.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
name: PR Approval Check
"on":
pull_request:
types: [opened, synchronize, reopened, edited, auto_merge_enabled, auto_merge_disabled]
branches: [main]
jobs:

Expand Down Expand Up @@ -42,3 +43,18 @@ jobs:
fi
fi
check_try:
runs-on: ubuntu-latest
steps:
- uses: octokit/[email protected]
id: check_approvals
with:
route: GET /repos/${{ github.repository }}/pulls/${{ github.event.review.number }}/reviews
env:
GITHUB_TOKEN: ${{ github.token }}
- id: test_variables
run: |
JSON_RESPONSE='${{ steps.check_approvals.outputs.data }}'
CURRENT_APPROVALS_COUNT=$(echo $JSON_RESPONSE | jq -c '[.[] | select(.state | contains("APPROVED")) ] | length')
echo "Current approvals count: $CURRENT_APPROVALS_COUNT"

0 comments on commit 74fc30f

Please sign in to comment.