Merge quick action should add to merge train instead of skipping queue
Problem to solve
GitLab provides quick actions such as /merge
so that I can merge a merge request that I have finished reviewing. When a project has merge trains enabled the /merge
quick action ignores the merge trains and merges the branch directly, which seems like unexpected behavior.
Further details
This can be confusing/ unexpected behavior when you have merge trains enabled and use quick actions.
Proposal
The /merge
should either start or add to the merge train if merge trains are enabled.
We can even update the tooltip to the user to be clear what /merge
is going to do, for example for "Merge when Pipeline succeeds" we have the following message:
Helper text should be as follows:
- No existing merge train, and the MR's pipeline has not yet finished
- Suggestion: /merge Start a merge train when the pipeline succeeds
- No existing merge train, and the MR's pipeline has finished
- Suggestion: /merge Start a merge train
- A merge train is already in progress, and the MR's pipeline has not yet finished
- Suggestion: /merge Add to merge train when the pipeline succeeds
- A merge train is already in progress, and the MR's pipeline has finished
- Suggestion: /merge Add to merge train
Weighting:
-
BE: Extend Merge Request API merge
endpoint to allow users to choose Auto Merge Method. -
BE: Make AutoMergeService
flexible to acceptupdate
atexecute
interface. -
FE: Show helper text for slash command according to the most recommended auto-merge-strategy (BE should already have exposed it in widget.json) -
Publish the feature (Documentation and Feature Flag Removal)
Edited by Jason Yavorska