Allow users to re-add an MR to a train with one click
### Release notes ### Problem to solve By @allison.browne There are two separate but related problems. 1. Removed/Dropped Train MR https://gitlab.com/gitlab-org/gitlab/-/issues/429263 * **Flow:** When an MR gets removed/dropped **before finishing** and the 'merge/add to train' button is there. * **Problem:** The messaging around why it is dropped is only a 'system note' and not always noticeable or even on the screen. 2. Failed Pipeline for Train MR (This Issue) * **Flow:** When the pipeline **finishes with a failure** and the user has to retry to be able to click auto-merge. * **Problem:** lots of manual steps and [messaging around what to do](https://docs.gitlab.com/ee/ci/pipelines/merge_trains.html#unable-to-add-to-the-merge-train) could be overlooked. ### Intended users ### User experience goal Re-adding an MR to a train should not involve multiple step action. ### Proposal #### Background From @drew's illustration: `The problem is that we treat Merge Train and Merge Request Pipelines as "head pipeline" with no differentiation when we check mergability. You can only add to Merge Train by clicking Merge, and you can only click Merge if the most recent CI passed. This makes no sense for Merge Train failures, as passing ones have already been merged.` For merge trains, we currently show the label as `Merge`. Change that to `Set to auto-merge` like for other auto-merge strategies. #### Solution To make progress on this issue faster, we're narrowing the scope a bit. We're now only looking at specific use case: `When Merge train pipeline has failed[recently], merge train is active and Pipeline must succeed is selected.` In that case, when merge train pipeline fails, users again see an option to `Merge` if the branch pipeline has succeeded. ~~if the branch pipeline ran not too long ago, the MR should be directly added to the end of the train. Else, the branch pipeline will restart and will add the MR to the end of the train once that succeeds.~~ ### Further details ### Permissions and Security ### Documentation ### Availability & Testing ### Available Tier ### Feature Usage Metrics ### What does success look like, and how can we measure that? ### What is the type of buyer? ### Is this a cross-stage feature? ### What is the competitive advantage or differentiation for this feature? ### Links / references
issue