Skip to content

Use the merge request description when squashing

What does this MR do?

When squashing a merge request, we currently set the commit message to be just the title. However, the merge request's description is full of useful information about the commit.

By including the description as well, we create a commit message that fits what is widely regarded as good commit message form.

This change also makes our squash of a merge request analogous to how merge requests are created from a single commit: the summary line of the commit message becomes the title, and the rest of the commit message becomes the description.

What are the relevant issue numbers?

This relates to issues #47079 (moved), #47149 (closed), gitlab-org/gitlab-ee#5315, and epic 9.

Note that there are future plans to do something better than this commit, but they are in the 4-7 release timeframe. If we could get this in in the meantime, it would be hugely valuable to the development teams that I've talked to.

Does this MR meet the acceptance criteria?

Edited by Nick Thomas

Merge request reports