summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xgit-hooks/gerrit-bot3
1 files changed, 2 insertions, 1 deletions
diff --git a/git-hooks/gerrit-bot b/git-hooks/gerrit-bot
index 4424227..287ad98 100755
--- a/git-hooks/gerrit-bot
+++ b/git-hooks/gerrit-bot
@@ -222,7 +222,8 @@ sub process_commit($$$$$)
}
}
$$verdict{tag} = 'autogenerated:sanity';
- if ($$verdict{labels}{'Sanity-Review'} == 1 && int(@{$$verdict{comments} || []}) == 0) {
+ my $hasComments = defined $$verdict{comments} && %{$$verdict{comments}};
+ if ($$verdict{labels}{'Sanity-Review'} == 1 && !$hasComments) {
# Don't spam everyone about a boring +1 sanity review with no comments.
$$verdict{notify} = "NONE";
}