aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/check-patches
diff options
context:
space:
mode:
authorBence Ferdinandy <bence@ferdinandy.com>2024-01-17 14:02:17 +0100
committerRobin Jarry <robin@jarry.cc>2024-01-18 22:07:21 +0100
commit51ec0159ec8c51e6bcba9a420de776f4738f02eb (patch)
tree7a25bf0c9b8cdeb08485bffbd3230be3045419ab /contrib/check-patches
parent7d28813d730fd2d4216a3b3365b0a5ec6f627d51 (diff)
downloadaerc-51ec0159ec8c51e6bcba9a420de776f4738f02eb.tar.gz
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 <bence@ferdinandy.com> Reviewed-by: Moritz Poldrack <moritz@poldrack.dev> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'contrib/check-patches')
-rwxr-xr-xcontrib/check-patches4
1 files changed, 4 insertions, 0 deletions
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