fj pr merge returns opaque HTTP 405 for a PR with merge conflicts (should say 'has merge conflicts / not mergeable') #159
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
fj pr merge <n> --style squashon a PR that has unresolved merge conflicts with the base returns a bare:error: HTTP status client error (405 Method Not Allowed) for url (.../pulls/<n>/merge)with no indication that the cause is merge conflicts. The 405 is indistinguishable from other merge-blockers (disabled merge style, failed required checks, branch protection), which sent a debugging session down the wrong path (chased branch-protection + required-check-contexts for ~30min) before a web-UI screenshot revealed 'Has conflicts with main that must be resolved'.
Ask
On merge failure, surface the actual reason. The PR object exposes mergeability (e.g. mergeable=false / a conflicting-files indicator);
fj pr mergeshould print something like:error: PR #<n> is not mergeable: has merge conflicts with <base> (resolve conflicts / rebase first)and ideally distinguish: conflicts vs failing required checks vs disabled merge method vs branch protection.
fj pr view/fj pr checkscould also show a conflict/mergeable line.Repro (2026-06-15)
rasterstate/paragon #449 (green CI, squash-only enabled) ->
fj pr merge 449 --style squash-> 405. Web UI showed merge conflicts with main. fj gave no conflict signal.