utils: hooks: pre-push: Catch commits without reviews

Improve the pre-push git hook script to reject commits without at least
one Reviewed-by line.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
Laurent Pinchart 2020-04-27 01:22:01 +03:00
parent fcfbec801b
commit 49856afa01

View file

@ -56,6 +56,13 @@ do
echo >&2 "Missing committer Signed-off-by in commit $commit" echo >&2 "Missing committer Signed-off-by in commit $commit"
errors=$((errors+1)) errors=$((errors+1))
fi fi
# 3. A Reviewed-by is required.
if ! echo "$msg" | grep -q '^Reviewed-by: '
then
echo >&2 "No Reviewed-by in commit $commit"
errors=$((errors+1))
fi
done done
if [ $errors != 0 ] if [ $errors != 0 ]