Repository navigation
fix(ci): do not fail the release sync when Actions may not open PRs - #13973
Merged
Merged
Conversation
This was referenced Sep 11, 2026
Merged
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.
Thinking Path
#13968 routed the release sync through a PR to get past the protected-branch rejection. Dispatching it surfaced the next layer:
A repository setting (Settings → Actions → General → Allow GitHub Actions to create and approve pull requests) forbids it. That is a policy choice, not a bug, and not mine to flip.
What is wrong is the reporting. The branch push — the part that actually does the work — had already succeeded. The job then died on the
gh pr createexit code, so the run read as failure when the sync was one click from done. That is the same silent-CI shape that letmaindrift 47 commits behind: a run whose outcome does not describe what happened.Note the error was also buried under ~30 lines of git credential cleanup in the log, well past the point most readers stop.
What Changed
.github/workflows/sync-main-to-dev.ymlonly — the failure handling aroundgh pr create.::warning::with a ready-made compare link and succeed, because the branch is pushed and the remaining step is human::error::and exit 1The restriction is matched on its message rather than on a bare non-zero exit, so a real breakage cannot be swallowed as "probably the permission thing".
Verification
The
run:block was extracted and exercised withghstubbed for each outcome:gh pr createbehaviourOpened https://…/pull/1,url=written, exit 0::warning::lines including…/compare/main...release-sync-main?expand=1, exit 0::error::Failed to open the release PR for a reason other than the Actions PR restriction, exit 1Not verified end to end: re-dispatching to prove it would open another real release PR, and one is already open (#13972). The stubbed run covers the branching; the live path is unchanged from #13968 apart from how failure is reported.
Alternative not taken
Enabling the repository setting would let the workflow open the PR itself and make this unnecessary. That is a permissions decision for the owner — Actions gaining PR-creation rights is a real expansion of what automation may do — so the workflow degrades honestly instead of asking for more privilege.
Refs #2445
Model Used
Opus 5