MRs whose head lands on the target by push stay open #330

closed cmc opened this on 2026-10-12 04:27 UTC

Discussion

cmc 2026-10-12 04:27 UTC

An open or source_gone merge request whose head reaches its target branch by a direct push, or inside another merged MR, is never marked merged. Post-receive only reacts to pushes to an MR's source branch, and MarkMerged is only called from mr merge. krz/orgstar!305 and !300 sat in source_gone with both heads already on main, counted as open.

Fix: when a branch moves from old to new, mark merged each open/source_gone MR targeting it whose head is an ancestor of new and was not of old. Run it from post-receive and after mr merge.

closed by cmc in commit aa92532762: mr: record merge requests whose head lands by push

2026-10-16 05:53 UTC

referenced in commit c07024b730 by cmc: changelog: v1.45.1

2026-10-16 06:45 UTC