Github + Bugzilla (an Addon for Firefox 4)

We use Github for the source code of the Firefox Add-on SDK (aka Jetpack). We use Bugzilla to track bugs and feature development. These two systems do not play nicely together.

One especially annoying aspect of the workflow we use for the Add-on SDK is that it’s a pain to submit a change in a way that satisfies both the Github and Bugzilla workflows. On Github you need to create a branch for your change, push it to Github, then go the page for the branch and submit a “pull request”, informing the forkees that you have changes you’d like merged into the main repository. On Bugzilla, the typical process is to attach a diff of your changes to a bug, and request review from a specific person.

Atul Varma improved things with a great idea: Submit an HTML file as a bug attachment, which points to the pull-request page on Github. He added a feature to Pybugzilla that, given a pull-request URL and bug id, would generate the HTML file and submit it as an attachment to the bug. We now had something that was attached to a bug, that a reviewer could r+ or r-, making it easy for anyone following along to know where things were at, while allowing the code review itself to be done inline on Github.

However, using the tool isn’t easy. You have to do your development work, then go to the Github page to make the pull request, then go back to the command line to construct the correct invocation of the command, then back to the Bugzilla page to request review from someone.

So I wrote an add-on to reduce the number of steps. With the Github Bugzilla Tweaks add-on, there’s now a button the Github pull-request page that allows you to submit the request as an attachment on a bug in one-click:

To make it work, just title your pull request starting with “bug ######”, replacing # with the bug id from Bugzilla. The add-on logs into Bugzilla with the stored credentials found in the Firefox password manager.

Install.

Source code.

About these ads

4 Comments on “Github + Bugzilla (an Addon for Firefox 4)”

  1. [...] The rest is here: Github + Bugzilla (an Addon for Firefox 4) « dietrich.blog [...]

  2. philikon says:

    This is great stuff and couldn’t have come at a better time as we’re starting to use Bugzilla *and* GitHub too.

    I extended Atul’s cmd line tool to optionally also request review (see https://github.com/philikon/pybugzilla). That way you wouldn’t have to go to Bugzilla at all. It shouldn’t be too hard to add this to your JetPack.

    I might give this a stab, although I actually thought of taking it one step further and automating the pull request as well. Given naming conventions for bug branches, one could create the pull request, update the bug and request review all in one go.

  3. Rob Miller says:

    This has the potential to be very helpful, thanks! Except… when I tried to use it, it didn’t work as advertised. I created a github pull request w/ a “bug ######” title and clicked the “attach to bug” button. It _nearly_ worked, except that it attached the pull request to the wrong issue. The bug that I wanted was 644245, but the attachment ended up on bug 9953:

    https://bugzilla.mozilla.org/attachment.cgi?action=edit&id=523410

    This is using FF4.0 on ubuntu meerkat, amd64.

    Thanks!

  4. Rob Miller says:

    Urgh… hadn’t seen the newer blog post with an update to the extension. I installed the updated, it showed the correct bug number on the button, so I gave it a whirl and it worked correctly. Thanks!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.