Skip to content

Show how many commits behind (diverged) the MR is from its target branch when it's Ready To Merge

Thomas Randolph requested to merge tor/defect/merge-widget-commits-behind into master

What does this MR do and why?

For #368295 (closed)

Before an MR is mergeable, it shows how many commits behind the target branch the merge request is.
Once the MR can be merged, the widget stops showing that information.

This change shows the same "commits behind" divergence amount when the MR is ready to merge.

Screenshots or screen recordings

Before After
diverged-commits-before diverged-commits-after

How to set up and validate locally

Please see the replication steps in the linked issue.

In short:

  1. Create an MR that can be merged
  2. Add commits to the target branch
  3. Note the "Ready to merge" widget content just above the "Merge" button.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Thomas Randolph

Merge request reports