Update availability of mwcp

What does this MR do and why?

Updates the "Merge When Checks Pass" (MWCP) auto-merge availability check to only block when the pipeline has succeeded, rather than when the pipeline is not in progress.

Before: MWCP was unavailable when the merge request was mergeable AND the pipeline was not considered "in progress" (which includes various non-running states).

After: MWCP is only unavailable when the merge request is mergeable AND the pipeline has explicitly succeeded.

This change ensures more precise control over when the auto-merge option should be available.

Changes

  • app/services/auto_merge/merge_when_checks_pass_service.rb: Changed condition from !diff_head_pipeline_considered_in_progress? to diff_head_pipeline_success?
  • Updated corresponding specs to reflect the new behavior

MR acceptance checklist

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

Edited by Marc Shaw

Merge request reports

Loading