gnome-shell/.gitlab-ci/commit-rules.yml
Florian Müllner 175175fac8 ci: Add commit rule to not end subject with punctuation
I recently forgot to fill in the subject after the prefix. Add a
commit rule for catching this and other cases where subject lines
end in punctuation (except ...)

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1722>
2021-02-26 14:59:07 +01:00

17 lines
745 B
YAML

patterns:
deny:
- regex: '^$CI_MERGE_REQUEST_PROJECT_URL/(-/)?merge_requests/$CI_MERGE_REQUEST_IID$'
message: Commit message must not contain a link to its own merge request
- regex: '^(st-|St)'
message: Commit message subject should not be prefixed with 'st-' or 'St', use 'st/' instead
where: subject
- regex: '^[^:]+: [a-z]'
message: "Commit message subject should be properly Capitalized. E.g. 'window: Marginalize extradicity'"
where: subject
- regex: '^\S*\.(js|c|h):'
message: Commit message subject prefix should not include .c, .h etc.
where: subject
- regex: '([^.]\.|[:,;])\s*$'
message: Commit message subject should not end with punctuation
where: subject