Overview
Commit message links are used to identify special strings in SCM commit messages and wrap them in hyperlinks. The most common use case is to wrap references to specific bugs in hyperlinks pointing to the record for that bug in an issue tracker. For example, given the commit string "Fixed bug 123.", you can transform the text "bug 123" into a link to the bug in Bugzilla.
Links are defined in two parts: a regular expression that identifies the special text, and a URL to use as the hyperlink. You can capture parts of the special string using regular expression groups, and then use group references in the URL. This allows you to capture, say, the "123" portion of the text "bug 123" and use that as part of the URL.
Configuration
name
A descriptive name for the link, used to identify it in the web interface.
This field is required.
expression
A regular expression to search for in commit strings. The expression is specified in Java regular expression format (similar to Perl regular expressions). Groups may be captured in the expression by using parentheses "()" to be used in the URL (see examples).
This field is required.
Examples
Identify Jira issue for a project with key "KEY":
Identify freeform references to bugs by number and capture the number as group 1 (e.g. Bugzilla bugs):
url
The URL to hyperlink to, usually expressed in terms of groups from the expression. Group references have the form $n where n is the group number. Note that group 0 refers to the whole text matched by the expression.
This field is required.
Examples
Continuing the Jira example from above:
Continuing the Bugzilla example, using the number captured as group 1:
restrict to projects
By default, when no projects are selected, the link will be applied to all changelists. If any projects from this list are selected, the links will only apply to changelists that affect those projects. This may be necessary if the pulse server is shared by multiple teams with different linking requirements.