You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by vi...@apache.org on 2015/09/22 07:11:22 UTC

mesos git commit: Updated the ReviewBot to flag reviews that do not contain reviewers.

Repository: mesos
Updated Branches:
  refs/heads/master 81f61414c -> beaf2228a


Updated the ReviewBot to flag reviews that do not contain reviewers.

Review: https://reviews.apache.org/r/37914


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/beaf2228
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/beaf2228
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/beaf2228

Branch: refs/heads/master
Commit: beaf2228a3fbb0a62207aaea346b8f527265b7ea
Parents: 81f6141
Author: Vinod Kone <vi...@gmail.com>
Authored: Fri Aug 28 14:31:36 2015 -0700
Committer: Vinod Kone <vi...@gmail.com>
Committed: Mon Sep 21 22:11:01 2015 -0700

----------------------------------------------------------------------
 support/verify_reviews.py | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/beaf2228/support/verify_reviews.py
----------------------------------------------------------------------
diff --git a/support/verify_reviews.py b/support/verify_reviews.py
index b85a324..0d322a1 100755
--- a/support/verify_reviews.py
+++ b/support/verify_reviews.py
@@ -38,6 +38,10 @@ if len(sys.argv) >= 5:
     QUERY_PARAMS = sys.argv[4]
 
 
+class ReviewError(Exception):
+  pass
+
+
 def shell(command):
     print command
     return subprocess.check_output(
@@ -71,6 +75,10 @@ def apply_reviews(review_request, applied):
     if review_request["id"] in applied:
         print "Skipping already applied review %s" % review_request["id"]
 
+    if not review_request["target_people"]:
+      raise ReviewError("No reviewers specified. Please find a reviewer by"
+                        " asking on JIRA or the mailing list.")
+
     # First recursively apply the dependent reviews.
     for review in review_request["depends_on"]:
         review_url = review["href"]
@@ -127,6 +135,12 @@ def verify_review(review_request):
             "Reviews applied: %s\n\n" \
             "Failed command: %s\n\n" \
             "Error:\n %s" % (applied, e.cmd, e.output))
+    except ReviewError as e:
+        post_review(
+            review_request,
+            "Bad review!\n\n" \
+            "Reviews applied: %s\n\n" \
+            "Error:\n %s" % (applied, e.args[0]))
 
     # Clean up.
     cleanup()