From 369e2ac9b5ab78f6cbc21fad28fceba9a6373261 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Wed, 4 Nov 2020 17:51:04 +0100 Subject: [PATCH] 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: --- .gitlab-ci/check-commit-log.sh | 5 +++++ 1 file changed, 5 insertions(+) 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