From: eric@webkit.org Date: Thu, 19 Nov 2009 20:28:09 +0000 (+0000) Subject: 2009-11-19 Eric Seidel X-Git-Url: https://git.webkit.org/?p=WebKit-https.git;a=commitdiff_plain;h=f70a200f594b70757d7b48ffbac235a134a09457 2009-11-19 Eric Seidel 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 --- diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog index 8b263e5a669f..53a5a3912a42 100644 --- a/WebKitTools/ChangeLog +++ b/WebKitTools/ChangeLog @@ -1,3 +1,14 @@ +2009-11-19 Eric Seidel + + 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 Reviewed by Pavel Feldman. diff --git a/WebKitTools/Scripts/modules/bugzilla.py b/WebKitTools/Scripts/modules/bugzilla.py index 3a9ca680816a..084c1c3b4999 100644 --- a/WebKitTools/Scripts/modules/bugzilla.py +++ b/WebKitTools/Scripts/modules/bugzilla.py @@ -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