Import Git / GitHub Commits to Targetprocess
This article describes how to set up Targetprocess one-way integrations for automatic import of source control commits from Git repositories.
When a Git integration is set up, Git users are able to update Targetprocess work items when they submit commits to Version Control repositories. They update entity states, submit time records, and post comments using special shortcut commands.
The integration does not connect GitHub branches / Gitlab Issues etc. and Targetprocess work items directly. To syncronize the items, consider using integration performed within third-party Tasktop data connector.
The following Git hosting providers are supported by the plugin:
- Team Foundation Server with Git
- Microsoft Visual Studio Team Services (VSTS, visualstudio.com) with Git. Detailed information specific to VSTS users is here: Import Git / TFVC Version Control Commits from VSTS to Targetprocess.
Only Targetprocess Administrators have permission to configure the Git plugin's settings.
To setup the Git plugin, go to Settings → System Settings → Plugins, and add a new Git Integration profile:
If the Git plugin icon is missing from the plugins page, check the troubleshooting guide.
A plugin profile can only leverage one repository at a time. If you need to import revisions from several repositories, you can add a new profile for each of them.
Profiles are not tied to your Targetprocess Projects and Teams. So, you can use both one repository for many Targetprocess projects, and many repositories for one Targetprocess project.
For Profile Name, use any unique name. Remember, you can’t change this name later.
This is how a full repository path should look:
To connect to a local Git repository from a web-based Targetprocess account, make sure the proxy server in your network accepts and forwards incoming connections from the web to your Git.
Two access methods are supported. You can connect to your Git account using Login and Password credentials pair or using a SSH key pair.
Login and Password
Use the credentials of any Git account that has access to the specified repository, and has the permissions to clone it.
Use an existing SSH key issued in OpenSSH format.
If you don’t have keys yet, you can generate them either directly in the Targetprocess by clicking Generate keys for me button or on your side using Git Bash app. How to issue a new SSH key pair from Git Bash and use it in Targetprocess.
When emails of your project members in Git and Targetprocess are different, you should map Git emails to Targetprocess user accounts in Targetprocess Git plugin profile settings. The users will be treated as Unknown in Targetprocess otherwise.
Commits created by unknown users are successfully attached to Source tabs of Targetprocess work items. However, no further actions such as state change, comment submit, time spent record post are performed with work items.
By default, users in Git and Targetprocess are mapped automatically if one of the following is true:
- Git email = Targetprocess email
- Git Name = Targetprocess Full Name (First Name + Last Name)
- Git name = Targetprocess Login
Otherwise, you'll need to map out your users:
As soon as the profile is created, Targetprocess will import Git revisions starting from the date you’ve specified. This can take several minutes.
You can track the import status in the log:
Commit Messages Format and Actions
Now, you can use the following commit messages for certain actions:
|Action||Commit message (#ID format)||Commit message (id:ID format)|
|Add time spent|
|Add time spent and time remaining|
|Update several entities at a time|
|All the actions in one commit message|
Make sure you enter the commit messages as shown above. Comments, time entries, and states will not update if the format is incorrect. Special words like comment and state are case sensitive, so you cannot use "Comment:" starting with a capital "C" in your commit message.
Multi-line comments are not supported at the moment.
In this example, as soon as the commit is done, the status of the entity with ID=584 will be changed to Done. The comment "Should be included to the current release" will be added to the entity, as well as the values for spent time (1 hour) and remaining time (2 hours).
You can see all updates from Git in the Source tab:
The Source tab is only shown if the Source Control practice is enabled for the Process your Project is based on. If you don't see the Source tab, enable the practice in Settings → Process setup → [Edit your process] → Practices. Administrators only can activate practices.
The plugin shows commit time records exactly as they are in Git. Multiple time zones and local settings are not supported.
For details on changes, click the Diff link:
If you delete a repository, the plugin profile, or both, the Diff links will become unavailable.
Need a more powerful integration with GitHub?
Targetprocess can be integrated with GitHub via our special Zapier bridge.
On-premise / On-Site TFS services
In the personal settings for your user account, you’ll need to enable alternate credentials.
Setup authentication with a TFS-based Git repository when Active Directory integration is configured
You may need to additionally configure TFS in order to allow alternative credentials for this sort of setup.
- On your hosting server, install basic authentication service role
- In IIS, change settings to let the TFS service accept this basic authentication
- In IIS, provide AD user mapping
- In the TFS administration console, set Authentication to NTLM
On your hosting server, install the basic authentication service role if it is missing. To install it, you go to Control PanelPrograms and Features then select Turn Windows features on or off. This will open a new dialog for you, go under the security node and check basic authentication and click OK.
Then in IIS you need to enable basic authentication for your TFS service and the TFS node inside it.
Go to IIS Manager, select Team Foundation Server. From the right panel select Authentication and disable everything other than basic auth.
Then restart your IIS. This way basic authentication will be enabled.
On TFS node, it may also be required to edit and set the domain and realm to the domain used for authentication:
Once you have the proper authentication mechanisms set up, you need to pick the account that the agent is going to run under, and assign the correct rights in TFS and the build pool.
Still have a question?
We're here to help! Just contact our friendly support team