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
- Enable merge trains in a project
- Create a
.gitlab-ci.yml
withscript: sleep 60
andafter_script: sleep 60
in a job - Create a merge request
- Wait for the build to transition to
running
- 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 ofAdd to merge train
Edited by Hordur Freyr Yngvason