[mutter] ci/check-commit-log: Check capitalization



commit 369e2ac9b5ab78f6cbc21fad28fceba9a6373261
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Wed Nov 4 17:51:04 2020 +0100

    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>

 .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 c7ca1b1069..754a7bca45 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]