Files
evig/scripts
GandClaude Opus 5 0abca3ca29 fix(ci): merge via REST when gh's client-side precheck refuses (#286)
Diagnosis, now with the number that was missing before: the sweep logs its own
view at the merge site, and it reads

    #278 direct merge refused (MERGEABLE/BLOCKED)
    #282 direct merge refused (MERGEABLE/BLOCKED)

while a PAT reads MERGEABLE/CLEAN for the same two PRs at the same moment.
mergeStateStatus is computed per viewer, and `gh pr merge` refuses client-side
on BLOCKED. `--auto` goes through the identical precheck, so it was refused
too — that fallback never fired.

main has branch protection with every option disabled, no rulesets, no
CODEOWNERS, no required checks and no required reviews, so there is no rule
being enforced here. Meanwhile #224, #225 and #226 — all of which modify
.github/workflows/ — merged normally, so this is not the workflows scope.

The REST merge endpoint skips the precheck and enforces the branch's actual
protection instead. If GitHub does refuse, it returns non-2xx and the PR is
left for the next sweep exactly as before; nothing is forced past a real rule.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-07 11:04:42 +00:00
..