Draft, retarget, review requests and stacks on merge requests !50

merged merged by cmc on 2026-09-06 21:49 UTC · krz/gitbay-ios:mr-lifecycle into main

Discussion

cmc

Four capabilities that were already on the wire but never decoded: draft, review_requests, stacked_on and stacked are all omitempty on mr show and mr list, so absence is the ordinary case and the models default rather than require.

Draft is a flag, not a fifth state — state stays open, and a draft simply does not merge, which the merge control now says rather than offering a button the server refuses. mr create gains a Draft toggle.

Retarget picks a branch from repo refs and warns that approvals go stale, since an approval was of the diff against the old target. The picker distinguishes loading, failed and genuinely-empty rather than showing an empty list for all three.

The stack reads in both directions — what this is stacked on, and what is stacked on it — each linking through. Squash and rebase are hidden while anything is stacked, since they would rewrite the commits the stack builds on; fast-forward and a merge commit both remain, which is what the server actually permits.

Reviewers can be requested and removed through mr review request.

Closes four parity rows: draft/ready, retarget, request a review, and stacked merge requests.