Add MergeTrains::CreateRefService
What does this MR do and why?
The EE-only bit of MergeRequests::CreateRefService
was actually
specific to merge trains and needed to be extracted before we could
re-use this service in other parts of the code. The idea is that
MergeRequests::CreateRefService
should supersede
MergeRequests::MergeToRefService
, in some (or all) cases. For example,
for merged result pipelines when automatic rebases are enabled.
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
We can verify that fast-forward merge trains still work after this change:
- Run
bin/rake gitlab:seed:merge_trains:project
. This will generate a project with a bunch of MRs. - In the generated project, ensure fast-forward merges are enabled, along with merge trains.
- Rapidly merge several MRs in the projects, so they all end up on the same train.
- Observe that all of them still merge
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Hordur Freyr Yngvason