Skip to content

Fix merge train merge availability when pipeline is canceling

What does this MR do and why?

This follows up on the work in #440238 (closed) to treat the canceling status in the same way as blocked.

Otherwise, when Pipelines must succeed is disabled, the default merge action would become an immediate merge, which is typically not desirable when merge trains are enabled.

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

  1. Enable merge trains in a project
  2. Create a .gitlab-ci.yml with script: sleep 60 and after_script: sleep 60 in a job
  3. Create a merge request
  4. Wait for the build to transition to running
  5. Cancel the pipeline

Expected:

  • Hovering the pipeline status icon it should say Canceling in the alt text.
  • The merge action should be called Merge with a help text of Add to merge train
Edited by Hordur Freyr Yngvason

Merge request reports