Allow to revert/cherry-pick squashed MRs with FF strategy
What does this MR do and why?
Contributes to #22236 (closed)
Problem
Fast-forward MR strategy doesn't create a merge commit. That hides revert/cherry-pick button on the merge request, because there is no merge commit related to the merge request.
However, this functionality should be available when the merge request was squashed or it had only one commit.
Solution
Use squash_commit
or a single commit as a point for revert/cherry
pick.
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
- Go to the project Settings -> Merge requests
- Set "Fast-forward merge"
- Click "Save changes"
- Create a merge request with 2 commits
- Go to the merge request page
- Select "Squash commit" option and click on "Merge" button
- After page reload click on "Revert" button
- You should be able to create a revert MR
Edited by Vasilii Iakliushin