fix(ci): use PAT (GH_TOKEN) instead of GITHUB_TOKEN for recheck workflow (#6057)

Events created by GITHUB_TOKEN do not trigger other workflows (GitHub
design to prevent infinite loops). Switch to the repo's GH_TOKEN PAT
so close/reopen events properly trigger pr-quality-check.

https://claude.ai/code/session_01JcdbDdtERhAXFFZmu3pCVY

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Avelino 2026-02-28 05:35:18 -03:00 committed by GitHub
parent fd64abec8a
commit 18e5e3b34c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -14,7 +14,10 @@ jobs:
steps:
- name: Re-run quality checks on all open PRs
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Must use a PAT (not GITHUB_TOKEN) so that close/reopen events
# actually trigger other workflows like pr-quality-check.yaml.
# GitHub deliberately ignores events created by GITHUB_TOKEN to prevent loops.
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
echo "Fetching all open PR numbers..."
prs=$(gh pr list --repo "$GITHUB_REPOSITORY" --state open --limit 500 --json number --jq '.[].number')