Mapping External Links in Comments

Search
Searching TeamCity 4.x Documentation
Table of Contents

TeamCity allows to map the issues in comments of the users' commits in the version control system using the search and replace pattern.

To configure mapping:

  1. Navigate to the file  TeamCity data directory/config/main-config.xml
  2. Locate section <comment-transformation>, or create one under the <server> tag, if it doesn't exist (you may refer to the main-config.dtd file for the XML structure definition)
  3. Specify the search and replace patterns. For example, you can use the following pattern for enabling JIRA integration:
<server>
...
   <comment-transformation>
     <transformation-pattern
       search="(>|\(|\s|^)([A-Z]+-\d+)(\b|$)"
       replace="$1&lt;a target=&quot;_blank&quot; title=&quot;Click to open this issue a new window&quot; href=&quot;
       http://www.jetbrains.net/jira/browse/$2&quot;&gt;$2&lt;/a&gt;$3"
       description="JetBrains Jira issue link" />
   </comment-transformation>
...
</server>
Search & replace patterns have java.util.regex.Pattern syntax.

Labels