diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-04-27 01:22:01 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-04-30 00:43:09 +0300 |
commit | 49856afa01c36d7e41f3a1ed31d7437e7e01dcc8 (patch) | |
tree | 07bcfd20b3cd942b9616b506ec31958bcbb3d286 /utils/hooks/pre-push | |
parent | fcfbec801bab520bcbb246f38f8efc448c901946 (diff) |
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>
Diffstat (limited to 'utils/hooks/pre-push')
-rwxr-xr-x | utils/hooks/pre-push | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/utils/hooks/pre-push b/utils/hooks/pre-push index 0eb8f5ce..5dc8adda 100755 --- a/utils/hooks/pre-push +++ b/utils/hooks/pre-push @@ -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 ] |