Skip to content

ci: leave the cascade PR open when auto-merge is not allowed - #258

Merged
lisachenko merged 1 commit into
4.xfrom
feature/friendly-cori-zyci9y
Nov 3, 2026
Merged

lisachenko merged 1 commit into
4.xfrom
feature/friendly-cori-zyci9y

Conversation

@lisachenko

Copy link
Copy Markdown
Member

Problem

The "Cascade 4.x into master" job failed on the push of #256: it opened the cascade PR (#257), then gh pr merge --auto failed with

GraphQL: Auto merge is not allowed for this repository (enablePullRequestAutoMerge)

because "Allow auto-merge" is off in the repository settings. The PR itself was fine (its checks are green), but the job ended red.

Change

cascade-merge.yml:

  • When gh pr merge --auto fails because auto-merge is not allowed, the job prints the error and a ::notice ("merge the cascade PR manually"), then succeeds. The PR stays open for a manual merge.
  • Any other failure of gh pr merge still fails the job.
  • The body of newly opened cascade PRs says they merge automatically only when auto-merge is allowed, and otherwise must be merged manually.

Testing

I ran the step's script locally with a stand-in gh:

  • the "Auto merge is not allowed" error exits 0 with the notice;
  • any other error exits 1.

The YAML parses and the script passes bash -n.


Generated by Claude Code

With "Allow auto-merge" off in the repository settings, enabling auto-merge
on the cascade PR fails with "Auto merge is not allowed for this
repository", which failed the whole job although the PR was opened (#257).
The job now reports a notice and leaves the PR open for a manual merge;
any other failure of `gh pr merge` still fails it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FxhC1CBg4rnTu9UjAMcCpL
@lisachenko
lisachenko marked this pull request as ready for review November 3, 2026 17:32
@lisachenko
lisachenko merged commit ae1fd68 into 4.x Nov 3, 2026
7 checks passed
@lisachenko
lisachenko deleted the feature/friendly-cori-zyci9y branch November 3, 2026 17:32
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