Skip to content

Add new merge strategy in frontend as preferred

Martin Čavoj requested to merge 407352-mwpsa-5 into master

What does this MR do and why?

Related to #407352 (closed) and #8128 (closed).

This MR builds on top of !121828 (merged) and !121847 (merged).

It adds the new merge strategy to frontend and uses it as preferred over merge_when_pipeline_succeeds.

Screenshots or screen recordings

Various scenarios

Approval is given before pipeline succeeds (same behavior as the current MWPS)

merge_when_checks_pass_approve_before

Approval is given after pipeline succeeds (new behavior that merges the MR)

merge_when_checks_pass_after_approval

Merge is clicked after the approval is given and pipeline succeeds (current behavior without auto-merge)

merge_when_checks_pass_all_pass_before

With feature flag :merge_when_checks_pass disabled (uses MWPS)

merge_when_checks_pass_mwps

How to set up and validate locally

  1. Enable the feature flag
    Feature.enable(:merge_when_checks_pass)
  2. Open an MR which requires approval
  3. Click "Set to auto-merge"
  4. Wait until pipeline succeeds
  5. Approve
  6. MR gets merged

Todos

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 Martin Čavoj

Merge request reports

Loading