You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pr-merge-autopilot.sh consistently reports "Failed to merge" when merge actually succeeded #173
Over the course of 2026-05-12/13, every successful auto-merge via scripts/pr-merge-autopilot.sh printed:
```
[HH:MM:SS] Conditions met for merge
✗ Failed to merge PR #NNN
```
…immediately followed by GitHub showing the PR as merged with a real merge commit (PRs #157, #158, #159, #161, #162, #163, #164, #166 all hit this).
The autopilot's gh pr merge call seems to race against GitHub's auto-merge feature — by the time the script invokes gh pr merge --squash, the PR has already auto-merged (because all required checks went green during the polling loop), and the merge call returns non-zero because there's nothing left to merge.
This forced a manual gh pr view <n> after every autopilot run to confirm actual merge status, which defeats the autopilot's purpose.
Proposed solution
After the gh pr merge call returns non-zero, the script should:
Activity
fix(autopilot): trust server state over gh exit code on merge
fix(autopilot): trust server state over gh exit code on merge
fix(autopilot): trust server state over gh exit code on merge (#185)