[go: up one dir, main page]

Skip to content

Allow user choice of merge options at the time of merging

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Problem to solve

Current settings affect all MRs in the project and users expressed there are times they want merge commits (feature branches) and times they do not (small bug fixes.)

Proposed solution

Allow users choice of merge options at the time of merging

Acceptance criteria:

  • Update the merge method section replacing radios with checkboxes
  • Update the merge method description to indicate optional settings.
  • Update the squash commits section
    • Update description
    • Replace the radio options with a dropdown
    • Update option descriptions
  • Update the merge request widget to accommodate options

Merge requests settings

image

Squash commits when merging

Merge request widget configurations:

image image

  • Merge method options
    • Merge commit
    • Merge commit with semi-linear history
    • Fast-forward merge
    • Squash merge
  • Only options selected in the Merge method settings should be shown in the dropdown
  • If only one option is selected in the Merge method settings, hide the Merge method section within the merge request widget
  • When Squash merge is selected, hide the option to squash commits
  • Scenarios 3, 4, 5, and 6 would trigger the rebase flow if the source branch is not up to date.

Scenarios:

Number Configuration Example result
1 Merge commit, Squash commits: off image
2 Merge commit, Squash commits: on image
3 Merge commit with semi-linear history, Squash commits: off image
4 Merge commit with semi-linear history, Squash commits: on image
5 Fast-forward merge, Squash commits: off image
6 Fast-forward merge, Squash commits: on image
7 Squash merge, Squash commits: disabled (hidden) image
Edited by 🤖 GitLab Bot 🤖