mr merge --when-ready !520

merged merged by cmc on 2026-09-29 04:03 UTC · krz/gitbay:mr-when-ready-289 into main

Discussion

cmc

mr merge <n> --when-ready queues a merge that runs once MergeGates passes; --cancel dequeues.

  • Migration 0067: mr_merge_queue (queuer, strategy, reason, credential kind, key/token id), removed by trigger when the MR is merged or closed.
  • Attempts on status set, runner done and build cancel, review, thread resolve, mr ready, and push to the source branch; merges immediately if the gates already pass. The merge runs as the queuer, checked against their rights at merge time.
  • Stays queued with a recorded reason on unmet gates, a conflict, or a require-signed branch that is behind. A push from a writer keeps it queued and the new head must pass again.
  • Dequeues with a system comment when: a non-writer or a deploy key pushes to the source, the pusher cannot be checked, a non-writer retargets, the source branch is deleted, the queuer loses write or is disabled, or the queuing key or token is removed, revoked, expired or no longer full scope. An expiring credential cannot queue. Web-queued merges are tied to the account.
  • MR page shows the queued state, queuer, strategy and reason, with queue and cancel buttons; mr show, list and dashboard JSON carry it.
  • Parity, Users, CHANGELOG.

Closes #289