ci: allow a PAT to drive the cascade PR - #217
Merged
Merged
Conversation
The default GITHUB_TOKEN can open/merge PRs, but pull_request-triggered checks (PHPUnit, PHPStan) on a PR it opens are held for manual approval by GitHub's anti-recursion safeguard, so the first cascade PR (#216) never got its required checks to run automatically. Prefer an optional CASCADE_TOKEN repo secret (a PAT with Contents: write, Pull requests: write) when set, falling back to GITHUB_TOKEN otherwise. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013xfs2FHTpipY3LRBtC5vLK
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Cascade 4.x into masterworkflow (added in the previous push to4.x) uses the defaultGITHUB_TOKENto open/auto-merge a4.x→masterPR.action_requiredbecause GitHub's anti-recursion safeguard holdspull_request-triggered workflow runs for manual approval when the PR was opened viaGITHUB_TOKEN— see PR #216.CASCADE_TOKENrepo secret (a PAT withContents: write+Pull requests: write) that the workflow prefers overGITHUB_TOKENwhen set, so a real actor opens the PR and downstream checks run without manual approval. Falls back toGITHUB_TOKENif the secret isn't configured (current behavior).Test plan
CASCADE_TOKENrepo secret, then push a change to4.xand confirm the resulting cascade PR's checks run automatically (noaction_requiredstate).gh pr merge --autokeeps failing even once checks run.🤖 Generated with Claude Code
https://claude.ai/code/session_013xfs2FHTpipY3LRBtC5vLK
Generated by Claude Code