Add Configuration for default squash commit message in merge requests
Problem to Solve
The format of the default squash commit messages in projects is very dependent on the workflow of the team and preference for commit message standards. Currently the default for all teams is the merge request title.
However, some teams prefer using the “first multi-line commit” as the squash commit message. This was the default behavior until recently.
Additional Details
In gitlab-foss#47149 (closed) the ability to override the squash commit message was introduced. As part of this, a change was also introduced to select the default squash commit from the first multi-line commit as a signal of deliberate commit message
.
This change was met with confusion and concern for teams that had relied on the merge request title for their automation and commit standards. Details of these concerns can be found in #26748.
Recently, a community contribution changed the default commit message for squashed commits to be the merge request title. This change in behavior was also met with frustration and broken workflows.
Proposal
With #345275 (closed) we now have a way to customize the default squash commit message per project.
To support the old default of using the “first multi-line commit” as the squash commit message, we should support a new variable %{first_multiline_commit}
in the squash commit message template.