feat(pull-requests): list rows say auto-merge, and arming never merges outright - #227
Merged
Merged
Conversation
…s outright Only the detail page said whether a pull request was armed to merge on its own, so the list gave no hint which branches would land without anyone coming back. Worse, "Enable auto-merge" ran `gh pr merge --auto`, which merges a ready pull request on the spot instead of arming it, with no confirmation. List rows now carry the auto-merge flag from every host that reports one (GitHub, including the authored search; GitLab; Azure DevOps) and the page shows it as a mono "auto-merge" word on the meta line of an open, non-draft row. The GitHub provider reads the pull request's merge readiness before arming and refuses a ready one with "This pull request can merge right now. Use Merge instead." The repository read also picks up `allow_auto_merge`, and the service drops the enable action from the detail's capabilities where it is off, so the menu item never appears on a repository that would refuse it.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
badcuban
enabled auto-merge
September 5, 2026 06:24
badcuban
disabled auto-merge
September 5, 2026 07:57
badcuban
enabled auto-merge (squash)
September 5, 2026 07:57
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.
Problem
Only the detail page said whether a pull request was armed to merge on its own. The list gave no hint which branches would land without anyone coming back for them.
Worse, "Enable auto-merge" ran
gh pr merge --auto. On a pull request that is already ready, that command merges it on the spot instead of arming it, with no confirmation. And on a repository with auto-merge switched off, the menu item still appeared and GitHub's raw GraphQL error came back.Fix
mergeStateStatusbefore arming and refuses a ready pull request with "This pull request can merge right now. Use Merge instead." Nothing reaches the host in that case.allow_auto_merge. The service dropsenable-auto-mergefrom the detail's capabilities where it is off, so the menu item never appears on a repository that would refuse it.The optional list field is in
packages/contracts; the provider-sideautoMergeEnabledmoved onto the shared list row type so the detail inherits it.Verification
vp run typecheck, scopedvp fmtandvp lint: clean.@threadlines/server#test pullRequest/: 107 passed, including new tests for the list decoder, the authored search, the ready check (both branches), the repository decode, and the capability narrowing.@threadlines/web#test:browser PullRequestsView: 10 passed, with a new assertion for the marker.Not in this PR
GitLab's
glab mr merge --auto-merge=truelikely merges outright too when no pipeline is running. Left for a follow-up.