From 51ec0159ec8c51e6bcba9a420de776f4738f02eb Mon Sep 17 00:00:00 2001 From: Bence Ferdinandy Date: Wed, 17 Jan 2024 14:02:17 +0100 Subject: check-patches: check for a prefix in commit title The contributing guidelines ask for a use of a short prefix in the commit title. Delegate nitpicking about the existence of the prefix to the CI. Signed-off-by: Bence Ferdinandy Reviewed-by: Moritz Poldrack Acked-by: Robin Jarry --- contrib/check-patches | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'contrib') diff --git a/contrib/check-patches b/contrib/check-patches index 741dd5b8..450eabae 100755 --- a/contrib/check-patches +++ b/contrib/check-patches @@ -29,6 +29,10 @@ for rev in $revisions; do err "title is longer than 72 characters, please make it shorter" fi + if ! echo "$title" | grep -q '^[a-z0-9,{}/_-]\+: '; then + err "title lacks a topic prefix (e.g. 'imap:')" + fi + author=$(git log --format='%an <%ae>' -1 "$rev") if ! git log --format="%(trailers:key=Signed-off-by,only,valueonly,unfold)" -1 "$rev" | grep -qFx "$author"; then -- cgit