Skip to content

ci: allow a PAT to drive the cascade PR - #217

Merged
lisachenko merged 1 commit into
4.xfrom
claude/cascade-merge-pat-fallback
Aug 25, 2026
Merged

ci: allow a PAT to drive the cascade PR#217
lisachenko merged 1 commit into
4.xfrom
claude/cascade-merge-pat-fallback

Conversation

@lisachenko

Copy link
Copy Markdown
Member

Summary

  • The Cascade 4.x into master workflow (added in the previous push to 4.x) uses the default GITHUB_TOKEN to open/auto-merge a 4.xmaster PR.
  • That PR's own required checks (PHPUnit, PHPStan) never ran: they're stuck as action_required because GitHub's anti-recursion safeguard holds pull_request-triggered workflow runs for manual approval when the PR was opened via GITHUB_TOKEN — see PR #216.
  • This adds an optional CASCADE_TOKEN repo secret (a PAT with Contents: write + Pull requests: write) that the workflow prefers over GITHUB_TOKEN when set, so a real actor opens the PR and downstream checks run without manual approval. Falls back to GITHUB_TOKEN if the secret isn't configured (current behavior).

Test plan

  • Add a CASCADE_TOKEN repo secret, then push a change to 4.x and confirm the resulting cascade PR's checks run automatically (no action_required state).
  • Also enable Settings → General → Pull Requests → Allow auto-merge (currently off — confirmed via API), otherwise gh pr merge --auto keeps failing even once checks run.

🤖 Generated with Claude Code

https://claude.ai/code/session_013xfs2FHTpipY3LRBtC5vLK


Generated by Claude Code

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
@lisachenko
lisachenko marked this pull request as ready for review August 25, 2026 06:26
@lisachenko
lisachenko merged commit ac9593c into 4.x Aug 25, 2026
7 checks passed
@lisachenko
lisachenko deleted the claude/cascade-merge-pat-fallback branch August 25, 2026 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants