ci: commit-lint stricter footer policy
@KevSlashNull found a workaround in our commit lint CI job:
It's possible to create commit messages that don't have an empty line after the title if we pretend that the second line is a footer (starting with BREAKING CHANAGE:
string).
The solution is to enforce the footer-leading-blank
.
The original discussion is in !231 (closed). Credit goes to @KevSlashNull
Testing the change
I've created a commit with the following commit message:
refactor: test footer leading blank violation
BREAKING CHANGE: footer lead blank violation
The footer-leading-blank
rule had the following effect on such commit.
rule setting |
commit-lint job results |
pipeline |
---|---|---|
'footer-leading-blank': [1, 'always'] |
success, because 1 means warning |
https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/pipelines/320438131 |
'footer-leading-blank': [2, 'always'] |
failure, because 2 means error |
https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/pipelines/320437476 |
Edited by Tomas Vik