Changeset 51463 in webkit


Ignore:
Timestamp:
Nov 28, 2009 4:20:45 PM (14 years ago)
Author:
abarth@webkit.org
Message:

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:
Location:
trunk/WebKitTools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r51462 r51463  
     12009-11-28  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        [bzt] CC webkit-bot-watchers whenever the bots touch bugs
     6        https://bugs.webkit.org/show_bug.cgi?id=31952
     7
     8        The mailing list is open for anyone to subscribe.
     9
     10        * Scripts/modules/bugzilla.py:
     11        * Scripts/modules/commands/queues.py:
     12
    1132009-11-28  Adam Barth  <abarth@webkit.org>
    214
  • trunk/WebKitTools/Scripts/modules/bugzilla.py

    r51447 r51463  
    508508            self.browser.set_value(comment_text, name='comment', nr=0)
    509509        self.browser.submit()
    510    
    511     def post_comment_to_bug(self, bug_id, comment_text):
    512         self.authenticate()
    513 
    514         log("Adding comment to bug %s" % bug_id)
    515         if self.dryrun:
    516             log(comment_text)
     510
     511    def add_cc_to_bug(self, bug_id, email_address):
     512        self.authenticate()
     513
     514        log("Adding %s to the CC list for bug %s" % (email_address, bug_id))
     515        if self.dryrun:
    517516            return
    518517
    519518        self.browser.open(self.bug_url_for_bug_id(bug_id))
    520519        self.browser.select_form(name="changeform")
    521         self.browser['comment'] = comment_text
     520        self.browser["newcc"] = email_address
     521        self.browser.submit()
     522
     523    def post_comment_to_bug(self, bug_id, comment_text, cc=None):
     524        self.authenticate()
     525
     526        log("Adding comment to bug %s" % bug_id)
     527        if self.dryrun:
     528            log(comment_text)
     529            return
     530
     531        self.browser.open(self.bug_url_for_bug_id(bug_id))
     532        self.browser.select_form(name="changeform")
     533        self.browser["comment"] = comment_text
     534        if cc:
     535            self.browser["newcc"] = cc
    522536        self.browser.submit()
    523537
  • trunk/WebKitTools/Scripts/modules/commands/queues.py

    r51462 r51463  
    5656
    5757class AbstractQueue(Command, WorkQueueDelegate):
     58    watchers = "webkit-bot-watchers@googlegroups.com"
    5859    def __init__(self, options=[]):
    5960        options += [
     
    6263        ]
    6364        Command.__init__(self, "Run the %s" % self.name, options=options)
     65
     66    def _cc_watchers(self, bug_id):
     67        try:
     68            self.tool.bugs.add_cc_to_bug(bug_id, self.watchers)
     69        except Exception, e:
     70            log("Failed to CC watchers: %s." % e)
    6471
    6572    def queue_log_path(self):
     
    136143
    137144    def process_work_item(self, patch):
     145        self._cc_watchers(patch["bug_id"])
    138146        self.run_bugzilla_tool(["land-attachment", "--force-clean", "--non-interactive", "--parent-command=commit-queue", "--quiet", patch["id"]])
    139147
     
    214222            # Local-only logging helpful for development:
    215223            # log("** BEGIN BUG POST **\n%s** END BUG POST **" % message)
    216             tool.bugs.post_comment_to_bug(patch["bug_id"], message)
     224            tool.bugs.post_comment_to_bug(patch["bug_id"], message, cc=cls.watchers)
    217225
    218226
Note: See TracChangeset for help on using the changeset viewer.