Whamcloud - gitweb
LU-6907 contrib: make gerrit_checkpatch.py less spammy 29/15729/3
authorOleg Drokin <oleg.drokin@intel.com>
Mon, 27 Jul 2015 04:59:26 +0000 (00:59 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 27 Jul 2015 19:09:02 +0000 (19:09 +0000)
Currently every checkpatch message is broadast to everybody
on the patch and then to all watchers.
Use the REST API to indicate that on failure the message
should only be sent to the patch owner and in case of success
the emails should not be sent at all.

Change-Id: I65b2017c1cc9558eed3707d81f936acac4af37f5
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/15729
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
contrib/scripts/gerrit_checkpatch.py

index 9649978..5058deb 100755 (executable)
@@ -176,14 +176,16 @@ def review_input_and_score(path_line_comments, warning_count):
             'labels': {
                 'Code-Review': code_review_score
                 },
-            'comments': review_comments
+            'comments': review_comments,
+            'notify': 'OWNER',
             }, score
     else:
         return {
             'message': 'Looks good to me.',
             'labels': {
                 'Code-Review': code_review_score
-                }
+                },
+            'notify': 'NONE',
             }, score