A draft merge request (title prefixed with WIP: or [WIP]) cannot be merged, and the only way to mark it ready is the web button (POST /{repo}/merge-requests/{n}/ready). The CLI and the API have no equivalent, so an agent or a script that opens a draft must ask a human to click before it can merge.
MergeRequests.MarkReady already exists in the use case (internal/usecase/mergerequests.go).
Proposal
- ermite-api: a
MarkReadyRPC onMergeRequestService(needsmr:write, like editing the title), behind a feature flag such asmerge_requests.ready. - ermite: the RPC adapter calls
MarkReady; the CLI getsermite mr ready <repo> <n>, which prints the merge request URL likemr create, and--json. - Docs:
docs/cli.mdandskills/ermite/.
Acceptance criteria
-
ermite mr ready <repo> <n>removes the draft prefix and the merge request can then be merged. - Not open, or not a draft: a clear error.
- A token without the required scope is refused, with the same rule as the web.