Configuration

Configure the Integration

Open the file configuration.xml in a text editor (i.e. notepad.exe), change the configuration parameters listed below, and save your changes.

The VersionOneConnection element specifies how the integration connects to your VersionOne server.

Element Description Example
Path URL to VersionOne Server https://www14.v1host.com/v1sdktesting/
UserName Valid VersionOne user. admin
Password Password for user admin

If your VersionOne instance is configured for Windows Integrated Authentication, you need to leave the UserName and Password elements blank.

The nested ProxySettings element specifies proxy settings for your VersionOne connection.

Element Description Example
UseProxy Indicates if the connection uses a proxy false
Path URL of Proxy Server http://proxyserver:3128
UserName Username for proxy proxyUser
Password Password for Proxy user proxyUserPass

The GitSettings element contains Instance elements. Each Instance element specifies how the integration connects to a Git repository. The example below only shows a single repository. To connect with multiple repositories, simply add more Instance elements.

Element Description Example
Path Path to Repository git@github.com:account/repo1.git
Password Password for repository  
SshPassphrase SSH passphrase for accessing the Git  
WatchedBranchName Name of branch to watch master
UseBranchName Determines how the integration will parse VersionOne identifiers. The default setting (false) configures the integration to parse the commit comment to find a VersionOne ID. Another pattern for agile version control is "branch on story". For this pattern, set UseBranchName to true to enable the integration to parse the branch name for a VersionOne ID. false

Each Instance element has one Link element that specifies how Links are created in VersionOne.

Element Description Example
Name Determines the Title on the Link in VersionOne. If you'd like to include the Git commit identifier in the title, add {0} ChangeSet: {0}
URL The contents of this element are used to create a URL to the actual Git commit. The {0} is replaced with the Git commit identifier  
OnMenu Determines if the Link Title appears on the Story or Defect Details page in VersionOne. true

The following elements control integration behavior.

Element Description Example
LocalDirectory Name of a local directory to use. The integration uses Java conventions for the path separator. c:\\temp\\git\\data\\
Timeout Determines how long the integration waits before polling Git. The value is in milliseconds. 60000 = 1 minute
AlwaysCreate Determines when the integration creates a VersionOne ChangeSet. false
ChangeComment The text used when creating or updating a VersionOne ChangeSet. Updated by Git
ReferenceAttribute Determines which VersionOne attribute is considered when looking for Stories or Defects. Number
ReferenceExpression Determines the Regular Expression used when searching Git comments for VersionOne Story or Defect Identifiers [[A-Z]{1,2}-[0-9]+]]

Example Configuration File

<?xml version="1.0" encoding="utf-8" ?>
<Configuration>

    <LocalDirectory>./v1sdktesting</LocalDirectory>
    <PollIntervalInSeconds>10</PollIntervalInSeconds> 

    <VersionOneConnection>
        <Path>https://www14.v1host.com/v1sdktesting/</Path>
        <UserName>admin</UserName>
        <Password>admin</Password>
        <!-- true - not use UserName and Password data in authentication-->
        <IntegratedAuth>false</IntegratedAuth>
        <ProxySettings>
            <UseProxy>false</UseProxy>
            <Path>http://proxyserver:3128/</Path>
            <UserName>proxyUser</UserName>
            <Password>proxyUserPass</Password>
        </ProxySettings>
    </VersionOneConnection>

   <GitConnections>
        <GitConnection>
            <Path>git://github.com/account/v1sdktesting.git</Path>
            <Password>pass</Password>
            <SshPassphrase></SshPassphrase>
            <WatchedBranchName></WatchedBranchName>
            <UseBranchName>true</UseBranchName>
            <Link>
                <NameTemplate>ChangeSet: {0}</NameTemplate>
                <UrlTemplate>https://github.com/account/v1sdktesting/commit/{0}</UrlTemplate>
                <OnMenu>true</OnMenu>
            </Link>
       </GitConnection>
    </GitConnections>

    <Timeout>10000</Timeout>
 <ChangeSet>   
        <AlwaysCreate>false</AlwaysCreate>
        <NameTemplate>{0}</NameTemplate>
        <NameTemplateDateFormat>yyyy-MM-dd HH:mm:ss</NameTemplateDateFormat>
        <NameTemplateRepositoryFormat>NameOnly</NameTemplateRepositoryFormat>
        <ChangeComment>Updated by Git</ChangeComment>
        <ReferenceAttribute>Number</ReferenceAttribute>
        <!--
            === Sample Regexes ===
            To Match S-01001 (Matches "S-01001"):                   [A-Z]{1,2}-[0-9]+
            To match #Reference (matches only "Reference"):         (?<=#)[a-zA-Z]+\b
            To match "V1:Reference"  (matches only "Reference"):    (?<=V1:)[a-zA-Z]+\b
        -->
        <ReferenceExpression><![CDATA[[A-Z]{1,2}-[0-9]+]]></ReferenceExpression>
</ChangeSet>

</Configuration>