Squash commit messages do not always use the merge request title
Release notes
The commit message in squashes now always use the merge request title.
Problem to solve
When sourcing the squash commit, the existing behavior is: https://gitlab.com/gitlab-org/gitlab/blob/e1acca6ead3c7a1f5ea2b5aff37e2aa552b438fd/app/services/merge_requests/squash_service.rb#L7-12
- If a custom message is provided, a squash is always performed and the custom message is used.
- If a custom message is not provided:
- For single commit, the commit's message is used, no squash is performed.
- For multiple commits, the title or the MR is used.
This leads to an unpredictable behavior in what ends up within the commit message from the view of the approver. Particularly when the title has been customized, the above can lead to it being entirely ignored when only a single commit exists at squash time.
Proposal
Always use the merge request's title as the squash commit message (regardless of number of commits), to make the behavior/result more predictable.