Commit 5312a5d
ci(release): direct-merge fallback only when the Version PR is already clean (#291)
The "enable auto-merge" step failed intermittently with
"GraphQL: Pull request is in clean status (enablePullRequestAutoMerge)".
Root cause: the changeset-release/main branch has no required status
checks, so the Version Packages PR is frequently immediately mergeable —
and `gh pr merge --auto` errors when there's no pending gate to attach to
(most recently on the #214 release, also seen earlier on bc577e9).
Fix: try --auto; on failure, direct-merge ONLY when the error is the
benign "Pull request is in clean status". Any other auto-merge failure
(e.g. "Allow auto-merge" disabled, missing permission) fails the job
loudly instead of silently direct-merging — addressing a review finding
that a blanket `|| direct-merge` would mask repo-settings drift. A
failing/pending check never reaches the fallback: --auto succeeds at
*enabling* in that case and just waits, so this cannot bypass a real
check.
CI-only change; require-changeset excludes .github/, so no changeset.
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>1 parent 76c87ba commit 5312a5d
1 file changed
Lines changed: 24 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
55 | 65 | | |
56 | 66 | | |
57 | 67 | | |
58 | 68 | | |
59 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
0 commit comments