From 50529226884176e3910f84a68fb260a3cb9fb3b2 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Mon, 29 Apr 2019 15:33:14 +0200 Subject: Suppress notification when there's nothing but a +1 from the sanity bot Fixes: QTBI-1549 Change-Id: I061eafd8ab5b27d07dd9165e82688fd8cbcbe78d Reviewed-by: Oswald Buddenhagen Reviewed-by: Frederik Gladhorn --- git-hooks/gerrit-bot | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/git-hooks/gerrit-bot b/git-hooks/gerrit-bot index e5e8845..cacfa0e 100755 --- a/git-hooks/gerrit-bot +++ b/git-hooks/gerrit-bot @@ -221,6 +221,10 @@ sub process_commit($$$$$) merge_hashes($verdict, $vd); } } + if ($$verdict{labels}{'Sanity-Review'} == 1 && int($$verdict{comments}) == 0) { + # Don't spam everyone about a boring +1 sanity review with no comments. + $$verdict{notify} = NONE; + } if (@invite) { if (system(@gerrit_actor, "set-reviewers", (map { ('-a', $_) } @invite), '--', $rev)) { print "===== ".strftime("%c", localtime(time()))." ===== invitation FAILED\n"; -- cgit v1.2.3