control: admin mr prune drops MR head refs and prunes the repository !399

merged merged by cmc on 2026-09-18 03:27 UTC · krz/gitbay:admin-mr-prune into main

Discussion

cmc

admin mr prune <owner/name> <n>... --yes: deletes refs/merge-requests/N/head for the named merged or closed MRs, runs git gc --prune=now on the repository, system comment per MR, audited as admin mr.prune. Open and source_gone MRs are refused before any write. mr diff on a pruned head says so instead of echoing git.

Nothing automatic on merge, close or rewrite (the GitHub model). Wiki: Admin (Maintenance), Users, Parity.

Closes #227