diff options
author | Jonas Ådahl <jadahl@gmail.com> | 2020-11-04 17:51:04 +0100 |
---|---|---|
committer | Jonas Ådahl <jadahl@gmail.com> | 2020-11-16 14:12:48 +0100 |
commit | 369e2ac9b5ab78f6cbc21fad28fceba9a6373261 (patch) | |
tree | 054ef321991c9f3919cd97f03ceb6def50db5cc1 /.gitlab-ci | |
parent | e7b126eb59028c1e3d88979026d5e235318990f5 (diff) | |
download | mutter-369e2ac9b5ab78f6cbc21fad28fceba9a6373261.tar.gz |
ci/check-commit-log: Check capitalization
To avoid commit messages such as 'window: don't capitalize title', and
instead enforce 'window: Capitalize title'.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1549>
Diffstat (limited to '.gitlab-ci')
-rwxr-xr-x | .gitlab-ci/check-commit-log.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/.gitlab-ci/check-commit-log.sh b/.gitlab-ci/check-commit-log.sh index c7ca1b106..754a7bca4 100755 --- a/.gitlab-ci/check-commit-log.sh +++ b/.gitlab-ci/check-commit-log.sh @@ -42,6 +42,11 @@ function commit_message_subject_is_compliant() { return 1 fi + if echo "$commit_message_subject" | sed -e 's/^[^:]\+: //' | grep -qe '^[[:lower:]]'; then + echo " - message subject should be properly Capitalized. E.g. 'window: Marginalize extradicity'" + return 1 + fi + if echo "$commit_message_subject" | grep -qe "\.[ch]:"; then echo " - message subject prefix should not include .c, .h, etc." return 1 |