2009-11-19 Eric Seidel <eric@webkit.org>
authoreric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Nov 2009 20:28:09 +0000 (20:28 +0000)
committereric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Nov 2009 20:28:09 +0000 (20:28 +0000)
        Reviewed by Darin Adler.

        bugzilla-tool's reviewer/committer rejection message should be clearer
        https://bugs.webkit.org/show_bug.cgi?id=31126

        Add more explanatory prose to bugzilla-tool's flag permission rejection message.

        * Scripts/modules/bugzilla.py:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@51202 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKitTools/ChangeLog
WebKitTools/Scripts/modules/bugzilla.py

index 8b263e5a669f7b9608c2acfbc8c580b196bbcb38..53a5a3912a42464c10b37dce2408e2ff96972fb7 100644 (file)
@@ -1,3 +1,14 @@
+2009-11-19  Eric Seidel  <eric@webkit.org>
+
+        Reviewed by Darin Adler.
+
+        bugzilla-tool's reviewer/committer rejection message should be clearer
+        https://bugs.webkit.org/show_bug.cgi?id=31126
+
+        Add more explanatory prose to bugzilla-tool's flag permission rejection message.
+
+        * Scripts/modules/bugzilla.py:
+
 2009-11-19  Eric Z. Ayers  <zundel@google.com>
 
         Reviewed by Pavel Feldman.
index 3a9ca680816a9d2605438e3fb22fd3640295636e..084c1c3b4999816a4387980b0c397aad297c3443 100644 (file)
@@ -239,6 +239,14 @@ class Bugzilla:
     def _view_source_link(self, local_path):
         return "http://trac.webkit.org/browser/trunk/%s" % local_path
 
+    def _flag_permission_rejection_message(self, setter_email, flag_name):
+        committer_list = "WebKitTools/Scripts/modules/committers.py"
+        contribution_guidlines_url = "http://webkit.org/coding/contributing.html"
+        rejection_message = "%s does not have %s permissions according to %s." % (setter_email, flag_name, self._view_source_link(committer_list))
+        rejection_message += "\n\n- If you have %s rights please correct the error in %s by adding yourself to the file (no review needed) and then set the %s flag again." % (flag_name, committer_list, flag_name)
+        rejection_message += "\n\n- If you do not have %s rights please read %s for instructions on how to use bugzilla flags." % (flag_name, contribution_guidlines_url)
+        return rejection_message
+
     def _validate_setter_email(self, patch, result_key, lookup_function, rejection_function, reject_invalid_patches):
         setter_email = patch.get(result_key + '_email')
         if not setter_email:
@@ -250,9 +258,7 @@ class Bugzilla:
             return patch[result_key]
 
         if reject_invalid_patches:
-            committer_list = "WebKitTools/Scripts/modules/committers.py"
-            failure_message = "%s does not have %s permissions according to %s." % (setter_email, result_key, self._view_source_link(committer_list))
-            rejection_function(patch['id'], failure_message)
+            rejection_function(patch['id'], self._flag_permission_rejection_message(setter_email, result_key))
         else:
             log("Warning, attachment %s on bug %s has invalid %s (%s)" % (patch['id'], patch['bug_id'], result_key, setter_email))
         return None