Skip to content

Add more system notes about status of merge when pipeline succeeds

Proposal

When a merge request is set to merge when the pipeline succeeds, a system note is added to the MR:

mwps_system_note

An automatic merge can be aborted when:

  • One or more threads are (re-)opened before the merge happens
  • Merge conflicts are introduced in the target branch
  • The pipeline fails
  • Any other situations?

It would be useful if system notes were added for each of these cases. Whenever an automatic merge is aborted, the reason why would be recorded. This would also help to clarify what steps need to be taken to fix it.

Currently, if a merge request is set to merge when the pipeline succeeds, there's no notification of the failure to merge (except maybe a failed pipeline email, though it doesn't obviously convey that the merge was aborted). This means that a merge request you thought got merged a while ago in fact still isn't merged, and it's not obvious why. With system notes (and notifications?) at least authors would be able to easily determine why (or react in a timely manner).

Questions

  • What should happen if an MR is set to MWPS, and some time before the pipeline completes, a thread is opened (or any other case preventing the merge)? Should a system note/notification be sent when the thread is opened, or later when the merge is finally aborted?
  • Similarly, what should happen if the situation preventing the MWPS from occuring is then resolved, e.g., the thread is closed, before the merge occurs?