Skip to content

Project setting to "Allow merge before pipeline(s) complete"

Release notes

Sometimes it is necessary to bypass Merge Results pipelines (if enabled) and Merge Trains (if enabled) when you have a high-priority merge request (for example, a critical patch) that must be merged urgently. But the consequence of having a Merge immediately button is the increased risk of merging a breaking change into your target branch. Now project owners/maintainers can disable this default behavior at the project-level by unchecking Allow merge before pipelines completes.

Problem to solve

NOTE: This feature is an interim solution for a merge requests priority2 ~bug #225488 (closed).

As a project maintainer or owner, I want the ability to disable Merge immediately, so I can reduce the risk of merging a MR that breaks the main/target branch.

When Merge Results pipelines is enabled and/or Merge Trains is enabled, the merge button has an alternate path to Merge immediately (see docs) which can potentially result in a merge that breaks the target branch IF the state of the target branch has changed AFTER the merge results pipeline succeeded (making whatever it validated outdated).

Intended users

  • Project Owner/Maintainer

User experience goal

The user should have a project setting to configure (enable/disable) Merge immediately button/capability.

Proposal

At project Settings > General > Merge requests (expanded) > Merge options (section):

  • Add new option is Allow merge before pipelines complete checkbox that is placed directly above the option/checkbox to Automatically resolve merge request diff discussions when they become outdated (refer to "Screenshot of existing options" below).
  • This new option should have the following copy/text:
    • Allow merge before pipeline(s) complete
      Merge requests can be merged before pipeline(s) complete by using the Merge immediately button, or an API call.
  • This new option is enabled by default (checkbox is checked for all projects).
  • If this new option is disabled, then:
Screenshot of existing options
Screen_Shot_2021-02-17_at_12.03.21_PM
Edited by Veethika Mishra