You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

What is an Issue Connector?

Issue Connectors are used as a simple way of generating hyperlinks to your issue tracking system. Once an Issue Connector is created, you can assign it to a repository you've previously setup in Continua. Whenever the next build is started, the issue connector will get the change sets associated with the build then parse those change set commit messages for issue id's. It will then take those  issue id's from the commit message and generate a hyperlink to that issue in your issue tracking system. The list of hyperlinks will be displayed in the "Issues" tab when viewing a build.

 

Why use an Issue Connector?

Suppose you have created a Configuration that builds your product using source code from a Repository. To make this happen you would need to attach that Repository to the Configuration. Once the Repository is attached to the Configuration it will start attaching change sets from that Repository to the Configuration. When the Configuration is next built it will get the relevant change sets from the Repository and attach them to the build. Lets say you've set up a Repository Trigger so every time a check in is made to the Repository the Configuration is built. In this scenario, the build will have the change set that triggered the build. If your companies' policy is have meaningful commit messages that make references to your issue tracking system, then an Issue Connector can help out. The idea is that when something is checked into your Repository you insert the issue id into the commit message. With an Issue Connector, you can give it a regular expression to parse the issue id. By also providing an Issue Server URL, you can tell the issue connector to take the id it parsed out of the commit message and insert it into the Issuer Server URL and make a hyperlink out of it.

Example:

Set up an Issue Connector like so:

Issue Sever URL:  http://www.issues.com/issue/{id}

Commit Message Regex: #(?<id>\d+)

Assuming a user checks into the repository with the message "Fixed annoying deadlock bug, solves issue #29981". The Issue Connector would extract the value "29981" out of the commit message and use the Issuer Server URL to generate the link "http://www.issues.com/issue/29981".

 

Issue Connector Rules and Restrictions

For an Issue Connector to work it must have an Id group.

The regular expression used to extract id's takes advantage of named groups. Whenever you use a named group in the regular expression it must have a corresponding tag in the Issue Server URL. 

The example above has the id in both fields... the highltighed text shows the matching pair:

Issue Sever URL:  http://www.issues.com/issue/{id}

Commit Message Regex: #(?<id>\d+)

 

You can have multiple groups in a regex/url

If you have an issue tracking system that also takes in a project, it's possible to modify the regular expression to handle it.

Suppose your commit message is: "Fixed bug for issue  #myawesomeproject-29981"

You could setup your Issue Connector like so:

Issue Sever URL:  http://www.issues.com/{project}/issue/{id}

Commit Message Regex: #(?<project>\w+)(?<id>\d+)


  • No labels