Skip to content

Draft: QA MR for Fix auto-merge on incomplete pipelines

Marc Shaw requested to merge fix-auto-merge-on-incomplete-pipelines-ff-on into master

What does this MR do and why?

Fix auto-merge on incomplete pipelines

This fixes the following omissions in the initial implementation of the expansion of auto-merge to merge requests with incomplete diff head pipelines:

  1. The "when pipeline succeeds" auto-merge variants should only be available on blocked statuses if "Pipelines must succeed" is enabled. Otherwise, standard merges should be the default. When pipelines are not required to succeed, we only expand auto-merge to the created status.
  2. In particular, when merge trains are enabled but pipelines are not required to succeed, the auto-merge action should simply be "Add to merge train".

Also included in this change are two fixes related to the "Merge immediately" dropdown:

  1. Use this.isAutoMergeAvailable instead of this.isPipelineActive to determine whether the dropdown should show, becauase the backend already checks the pipeline state when deciding whether a given auto merge service is available.
  2. Fixed the dropdown behaviour for fast-forward and semi-linear merge trains. Immediate merges should always be conditional on "Pipelines must succeed" being disabled, and the fast-forward check should also apply to the "when pipeline succeeds" variant.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Merge request reports