Skip to end of metadata
Go to start of metadata

FishEye can render any issue IDs or Bug IDs that appear in commit messages or comments as hyperlinks. Users can click the links to quickly navigate to the relevant issue/bug in your issue/bug tracker. This link rendering relies on FishEye detecting certain substrings in commit messages and comments. You can configure the "linker" patterns that FishEye uses to detect these substrings for each repository in FishEye.

Please note, if you have set up JIRA integration between your FishEye instance and a JIRA server, you will need to disable linkers for that JIRA server. Otherwise, the linkers will override the integration features described on that page (which includes linkers).

On this page:

Configuring linkers

You can configure linkers for a specific repository or configure linkers for all repositories.

Configuring linkers for a specific repository

To configure the linkers for a repository:

  1. Click the 'cog' menu in the FishEye header, and choose Administration (you'll need to be logged in as an administrator to see this link).
  2. Click the Repositories link. The list of repositories set up in your FishEye instance will be displayed.
  3. Click the name of the repository, (under the Name column in the list of repositories). The Repository Options for the repository will be displayed in a dialogue.
  4. Click the Linkers tab. The 'Linkers' screen will be displayed (see screenshot below).
  5. Configure the linkers for the repository as desired:
    • Click the Add... link to add a new linker. See the Adding a Linker section below for further instructions.
    • Click the cog icon () next to a linker and click Edit from the dropdown menu to edit a linker. The editable 'Linker' dialogue is identical to the 'Add a Link' dialogue, except that you cannot change the link type. See the Adding a Linker section below for further instructions.
    • Click the cog icon () next to a linker and click Delete from the dropdown menu to delete the linker.
  6. Save your changes.

Configure linkers for all repositories

To configure the linkers for all repositories:

  1. Click the 'cog' menu in the FishEye header, and choose Administration (you'll need to be logged in as an administrator to see this link).
  2. Click the Defaults link. The 'Repository Defaults' will be displayed, with the Linkers tab shown (see screenshot below).
  3. Configure the linkers for all repositories as desired:
    • Click the Add... link to add a new linker. Any new linkers added in the repository defaults will be inherited by all repositories. See the Adding a Linker section below for further instructions.
    • Click the cog icon () next to a linker and click Edit from the dropdown menu to edit a linker. The editable 'Linker' dialogue is identical to the 'Add a Link' dialogue, except that you cannot change the link type. See the Adding a Linker section below for further instructions.
    • Click the cog icon () next to a linker and click Delete from the dropdown menu to delete the linker.
  4. Save your changes.

Screenshot: Viewing linkers for all repositories

Adding a linker

To add a new linker:

  1. Navigate to the linkers for a specific repository or the repository defaults, as described above, and click the Add... link to add a new linker. The 'Add a Linker' dialogue will be displayed.
  2. Complete the fields on the dialogue as follows:
    • Linker Type — Select 'Simple' or 'Advanced'. Choose 'Simple' unless you are an experienced developer.
    • Description — Enter a description for your linker.
    • Regular Expression ('Simple' Linker Type) — Enter the regular expression defining the pattern that FishEye will look for when rendering links. FishEye uses the Java regular expression language, which is based on Perl 5 regular expressions. You can test your regular expressions on this online test page.
      (tick) Tip: If you want your regex to be case insensitive, put (?i) at the start of the regex.
    • Href ('Simple' Linker Type) — Enter the destination of the link. For example, http://jira.mycompany.com/browse/${0}
    • SyntaxDef ('Advanced' Linker Type) — See Configuring the SyntaxDef Field section below.
  3. Click the Add button to add the linker.
  4. Save your changes.

(tick) Tip: See the Example Linkers section below for examples of linkers to JIRA and Bugzilla servers.

Screenshot: Adding a new linker

Example linkers

Here are some examples of simple linkers.

JIRA examples

(warning) Do not create linkers for a JIRA server, if you have already set up JIRA integration between your FishEye instance and that JIRA server.

  • To link any occurrence of a JIRA-style issue to JIRA:

    The regular expression above matches any sequence of two or more alphabetical characters, followed by a dash, followed by a number, which comprise the format of JIRA isssue IDs (such as AB-123 or ABC-123 or ABCDE-123). Replace jirahost with the hostname of the desired JIRA instance.

  • To link a specific set of JIRA projects (e.g. JRA, CONF and CRUC) to a JIRA instance:

    The regular expression above matches only specific JIRA issue keys with any number, like JRA-123 or CONF-123 or CRUC-123. Replace jirahost with the hostname of the desired JIRA instance.

Bamboo examples

  • To link to specific Bamboo builds:

    The regular expression above matches Bamboo build IDs like ABC-MAIN-123 or ABC-BRANCH-123. These will then be made links to the build reports in your Bamboo instance. Replace bamboohost with the hostname of the desired bamboo instance.

Bugzilla examples

  • To link bug numbers that occur at the start of a line to Bugzilla:

  • To link bug numbers that occur after the word bug and optionally whitespace, ":" or "#" (e.g. Bug123, bug:123, or BUG #123):

    The regular expressions above matches Bugzilla bug IDs. These will then be made links to build reports in your Bamboo instance.

Configuring the SyntaxDef field

(info) This is an advanced feature, intended for use by experienced developers only.

Please note;

  • The description is optional.
  • You will want to define the three region properties as in the example below.

This example matches numbers that appear after a PR: and might be seperated by commas or 'and':

Understanding the SyntaxDef example:

  • The first regex matches means: match "PR:" followed by a sequence of numbers ("\d+") separated by whitespace, 'and' or commas.
  • The "context" means in the above match, link each number individually.