+2009-11-28 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ [bzt] CC webkit-bot-watchers whenever the bots touch bugs
+ https://bugs.webkit.org/show_bug.cgi?id=31952
+
+ The mailing list is open for anyone to subscribe.
+
+ * Scripts/modules/bugzilla.py:
+ * Scripts/modules/commands/queues.py:
+
2009-11-28 Adam Barth <abarth@webkit.org>
Reviewed by Eric Seidel.
# Bugzilla has two textareas named 'comment', one is somehow hidden. We want the first.
self.browser.set_value(comment_text, name='comment', nr=0)
self.browser.submit()
-
- def post_comment_to_bug(self, bug_id, comment_text):
+
+ def add_cc_to_bug(self, bug_id, email_address):
+ self.authenticate()
+
+ log("Adding %s to the CC list for bug %s" % (email_address, bug_id))
+ if self.dryrun:
+ return
+
+ self.browser.open(self.bug_url_for_bug_id(bug_id))
+ self.browser.select_form(name="changeform")
+ self.browser["newcc"] = email_address
+ self.browser.submit()
+
+ def post_comment_to_bug(self, bug_id, comment_text, cc=None):
self.authenticate()
log("Adding comment to bug %s" % bug_id)
self.browser.open(self.bug_url_for_bug_id(bug_id))
self.browser.select_form(name="changeform")
- self.browser['comment'] = comment_text
+ self.browser["comment"] = comment_text
+ if cc:
+ self.browser["newcc"] = cc
self.browser.submit()
def close_bug_as_fixed(self, bug_id, comment_text=None):
from modules.workqueue import WorkQueue, WorkQueueDelegate
class AbstractQueue(Command, WorkQueueDelegate):
+ watchers = "webkit-bot-watchers@googlegroups.com"
def __init__(self, options=[]):
options += [
make_option("--no-confirm", action="store_false", dest="confirm", default=True, help="Do not ask the user for confirmation before running the queue. Dangerous!"),
]
Command.__init__(self, "Run the %s" % self.name, options=options)
+ def _cc_watchers(self, bug_id):
+ try:
+ self.tool.bugs.add_cc_to_bug(bug_id, self.watchers)
+ except Exception, e:
+ log("Failed to CC watchers: %s." % e)
+
def queue_log_path(self):
return "%s.log" % self.name
return (True, "Landing patch %s from bug %s." % (patch["id"], patch["bug_id"]), patch)
def process_work_item(self, patch):
+ self._cc_watchers(patch["bug_id"])
self.run_bugzilla_tool(["land-attachment", "--force-clean", "--non-interactive", "--parent-command=commit-queue", "--quiet", patch["id"]])
def handle_unexpected_error(self, patch, message):
message = "Attachment %s did not pass %s:\n\n%s" % (patch["id"], cls.name, script_error.message_with_output(output_limit=None))
# Local-only logging helpful for development:
# log("** BEGIN BUG POST **\n%s** END BUG POST **" % message)
- tool.bugs.post_comment_to_bug(patch["bug_id"], message)
+ tool.bugs.post_comment_to_bug(patch["bug_id"], message, cc=cls.watchers)
class BuildQueue(AbstractTryQueue):