Bugzilla links in SourceTree

For those of you that use SourceTree for Mozilla development, here’s how you can set it up so bug numbers in comment messages become links to Bugzilla.

  1. Open your clone of mozilla-central
  2. Open repository settings (main menu → RepositoryRepository Settings)
  3. Select the Advanced tab
  4. Under Commit text links, click Add
  5. Set Replacement type to Other
  6. Set Regex pattern to:
  7. The next field currently differs depending on whether you’re on Windows or OS X.
    1. If you’re on windows, set Link to URL to:

      Your setting should end up looking like this:
      Screenshot of SourceTree on Windows
    2. If you’re on OS X, set Replace to:

      Your setting should end up looking like this:
      Screenshot of SourceTree on OSX

Now bug numbers in commit messages will be linkified like this:
SourceTree commit screenshot

You’ll need to do this for each repository clone you want Bugzilla links for.