Skip to content

Automatically update merge widget when new commits are pushed

Problem to solve

When I am viewing a merge request and new commits are pushed, I can see a new push event appear in the discussions tab, but the merge-ability widget updates to show a warning that I need to reload.

This is a particular nuisance when I apply a suggestion to a merge request, and then want to merge. Instead I have to reload and then merge.

Merge widget after push
Screen_Shot_2019-08-25_at_2.13.55_PM

Further details

There are a number of situations where this is not only inconvenient, but frustrating:

  • as the final reviewer, opening a merge request that is otherwise approved apart from one or two suggestions that can simply be applied and then merged - I have to reload the page before I can merge
  • as the final reviewer, spotting a small typo that could be fixed with a few taps by creating a suggestion and applying it yourself - I have to reload the page before I can merge
  • as author / reviewer, noticing a CI test failure in a merge request, making the fix and pushing it – I have to reload the page before I can merge

Smoothing these workflows provide polish, but are also a first step towards generally making the merge request interface more interactive and real-time. We should be embracing real-time feedback and queues for efficiency and collaboration.

Proposal

When a new push event occurs, update the merge widget with latest merge-ability status so I know if there are new conflicts.

Mockup Mockup
Screenshot_20190924T170421 Screenshot_20190924T165237

In the worst case scenario, this could mean someone merges a different change to what they expected, but the timing window for this is very small. Importantly, merge request approvals and CI pipelines are still required, and cannot be bypassed by the last minute push.

Permissions and Security

Merge controls like protected branches and approvals must still be enforced on both the frontend and backend.

Documentation

Testing

What does success look like, and how can we measure that?

We are measuring suggested changes adoption. Usage may increase marginally as it will make self-suggestion workflows easier.

Links / references

Edited by James Ramsay (ex-GitLab)