bzpost: add Bugzilla API key support (bug 1200449)
authorGregory Szorc <gps@mozilla.com>
Fri, 04 Sep 2015 12:13:55 -0700
changeset 3070 9c8b8187f21b12da3bedeec4a91dced132c47064
parent 3069 5d2431f11d23a355483ede7cec8458a0112c6dd9
child 3071 f26ccfdad271e9845b63bfea1cf285c9cf929f05
push id1114
push usergszorc@mozilla.com
push dateFri, 04 Sep 2015 20:16:45 +0000
treeherderversion-control-tools@f26ccfdad271 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1200449
bzpost: add Bugzilla API key support (bug 1200449)
hgext/bzpost/__init__.py
--- a/hgext/bzpost/__init__.py
+++ b/hgext/bzpost/__init__.py
@@ -144,17 +144,17 @@ def wrappedpushbookmark(orig, pushop):
     bzauth = getbugzillaauth(ui)
     if not bzauth:
         return result
 
     bzurl = ui.config('bugzilla', 'url', 'https://bugzilla.mozilla.org/rest')
 
     bugsy = Bugsy(username=bzauth.username, password=bzauth.password,
                   userid=bzauth.userid, cookie=bzauth.cookie,
-                  bugzilla_url=bzurl)
+                  api_key=bzauth.apikey, bugzilla_url=bzurl)
 
     def public_url_for_bug(bug):
         '''Turn 123 into "https://bugzilla.mozilla.org/show_bug.cgi?id=123".'''
         public_baseurl = bzurl.replace('rest', '').rstrip('/')
         return '%s/show_bug.cgi?id=%s' % (public_baseurl, bug)
 
     # If this is a try push, we paste the Treeherder link for the tip commit, because
     # the per-commit URLs don't have much value.