Skip to content

fix(web): pull request tab stops offering a merge GitHub will refuse - #223

Merged
badcuban merged 3 commits into
mainfrom
threadlines/fix-merge-action-during-checks
Sep 5, 2026
Merged

fix(web): pull request tab stops offering a merge GitHub will refuse#223
badcuban merged 3 commits into
mainfrom
threadlines/fix-merge-action-during-checks

Conversation

@badcuban

@badcuban badcuban commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

While a pull request's required checks were still running, the tab's Merge button stayed live, and clicking it surfaced GitHub's "add the --admin flag" refusal. The panel only disabled Merge for a draft or a conflict and never asked the host whether its branch rules would accept the merge. In the same flow, right after Update branch the header re-read itself before GitHub had queued the new commit's checks, saw an empty list, and stopped polling until the user hit Refresh.

The GitHub driver now reads mergeStateStatus (the field gh pr merge itself checks) and carries it as an optional mergeGate on the detail contract; GitLab, Bitbucket and Azure DevOps leave it absent and behave as before. When the gate is blocked, Merge stays on screen but disabled, with the reason written under it: "Waiting on 6 checks", "A check failed", "Needs an approving review", "Blocked by branch rules", or "Update the branch first". A running check with no rule requiring it no longer disables anything. The header keeps polling at the existing 20s pace for two minutes after a fresh push while it sees no checks or an undecided mergeability, then hands off to the poll-while-pending rule, so the checks rollup fills in on its own after Update branch.

Verified with fmt, lint, typecheck, the server pull request tests, the web logic tests, and the full web browser suite.

While required checks were still running, the Merge button stayed live and
the host answered with the `--admin` refusal, because the panel only greyed
it out for a draft or a conflict and never asked GitHub whether its rules
would take the merge. And after Update branch, the header re-read itself
before GitHub had queued the new commit's checks, saw none, and stopped
polling until the user hit Refresh.

The GitHub driver now reads `mergeStateStatus`, the same field `gh pr merge`
consults, and carries it as an optional `mergeGate` on the detail contract
(other hosts leave it absent). When it is blocked, Merge stays on screen but
disabled and the reason line says what is in the way: the checks still
running, a failed check, a review still owed, or the branch rules. The header
keeps polling for two minutes after a fresh push while it sees no checks or
an undecided mergeability, then hands off to the existing poll-while-pending
rule.
@vercel

vercel Bot commented Sep 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
threadlines Ready Ready Preview Sep 5, 2026 6:49am UTC

Request Review

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L labels Sep 5, 2026
@badcuban
badcuban enabled auto-merge September 5, 2026 06:49
@badcuban
badcuban merged commit eb9496f into main Sep 5, 2026
16 checks passed
@badcuban
badcuban deleted the threadlines/fix-merge-action-during-checks branch September 5, 2026 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant