[go: up one dir, main page]

Skip to content

Create suggestions as actual commits in a separate branch

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

Situation

Suggestions are a good way to do code review, however, when having more complex scenarios (#29700, #537531, #521929, #454339, etc.), they have their shortcomings

Solution

Don't create suggestions as comments but

  • Create a new branch
    • if it's the reviewers first suggestion
    • or if the reviewer wants to start a new set of conflicting changes
  • Create commit on said branch
  • Link the commit to the comment/MR in the UI
  • When applying the suggested change, the assignee might be offered two options:
    • Cherry-pick the specific commit
    • Merge the whole branch into the MR's branch

Benefits

  • Author, co-author, and committer information is correctly tracked via git (#526258)
  • Commit message is correctly tracked via git (#518632)
  • Pipelines would run for each suggestion (#35572)

Related

&832

Edited by 🤖 GitLab Bot 🤖