From df1adc97856a08b56199b8ebc2ea4060c709d06e Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Wed, 14 Aug 2024 16:53:27 +0300 Subject: gut-request-pull.sh: Check for local changelogs Signed-off-by: Laurent Pinchart --- git-request-pull.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/git-request-pull.sh b/git-request-pull.sh index 2b4835c..6a5afea 100755 --- a/git-request-pull.sh +++ b/git-request-pull.sh @@ -66,7 +66,14 @@ check_commits() { local msg=$(git cat-file commit "$commit") local summary=$(git show --pretty='format:%h ("%s")' -s $commit) - # 1. The commit message shall have Signed-off-by lines + # 1. The commit message shall not contain a local changelog. + if echo -E "$msg" | grep -q '^--- *$' + then + echo "Found local changelog in commit $commit" + errors=$((errors+1)) + fi + + # 2. The commit message shall have Signed-off-by lines # corresponding the committer and the author. local committer=$(echo "$msg" | grep '^committer ' | head -1 | \ cut -d ' ' -f 2- | rev | cut -d ' ' -f 3- | rev) @@ -84,7 +91,7 @@ check_commits() { errors=$((errors+1)) fi - # 2. Fixes: tags shall reference an ancestor commit. + # 3. Fixes: tags shall reference an ancestor commit. local fixes=$(echo "$msg" | grep '^Fixes: ') if [ -n "$fixes" ] ; then fixes=$(echo "$fixes" | sed 's/^Fixes: \([0-9a-f]\+\) (.*)$/\1/') -- cgit v1.2.3