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:
parent
fcfbec801b
commit
49856afa01
1 changed files with 7 additions and 0 deletions
|
@ -56,6 +56,13 @@ do
|
|||
echo >&2 "Missing committer Signed-off-by in commit $commit"
|
||||
errors=$((errors+1))
|
||||
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
|
||||
|
||||
if [ $errors != 0 ]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue