Add %{first_conventional_commit} variable for squash template
I heard you like squashes...
Photo by Melanie Hughes on Unsplash
Description
Conventional Commits is a convention for writing git commit messages which is used in a number of automation tasks, from compiling changelogs to cutting new releases. We use this convention when writing commit messages for gitlab-ui
(see relevant docs).
Let's add a variable for %{first_conventional_commit}
in the squash commit message template.
Thoughts
- What if there are more than one conventional commit? That's a really good question but a bit out of scope. Squashing implies we only want 1 commit at the end of it. To properly solve this, we'll need to set up something like an interactive rebase through the UI.
-
What if there are no conventional commits? I guess this would be the same behavior as
%{first_multiline_commit}
when there are no multiline commits?