Links to Launchpad in the Gerrit review UI
Turning the bug numbers in git commit messages to links was just a matter of adding this to our
[commentlink "launchpad"] match = "([Bb]ug\\s+#?)(\\d+)" link = https://bugs.launchpad.net/mahara/+bug/$2
All mentions of a bug number like "(bug #1234)" or "bug 5678" in a commit message or Gerrit review will be converted into links to the appropriate page on Launchpad.
Updating Launchpad bugs after Gerrit merges
Linking the original bug reports in Launchpad to committed code (and its review in Gerrit) was a little more complicated. It makes use of the hooks available in Gerrit.
For an example of what it sends to the bug tracker, see bug 788457.