Import Git / GitHub Commits to Targetprocess | Targetprocess - Visual management software

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:

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:

Import Git / GitHub Commits to Targetprocess. Image 1

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.

Repository Settings

For Profile Name, use any unique name. Remember, you can’t change this name later.

This is how a full repository path should look:

  • git://github.com/Company/Project.git
  • https://github.com/Company/Project.git
  • file:///c:/Repository
  • //localserver/trunk
  • http://localserver:8080/tfs/company/_git/TfsGit
  • https://accountname.visualstudio.com/P1/_git/P1%20Git

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.

Access Credentials

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.

SSH keys

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.

Users Mapping

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:

  1. Git email = Targetprocess email
  2. Git Name = Targetprocess Full Name (First Name + Last Name)
  3. Git name = Targetprocess Login

Otherwise, you'll need to map out your users:

Users Mapping

Importing Revisions

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:

Importing Revisions

Commit Messages Format and Actions

Now, you can use the following commit messages for certain actions:

ActionCommit message (#ID format)Commit message (id:ID format)
Change states#ID state:fixedid:ID state:fixed
Add comments#ID comment: text of your comment here
id:ID comment: text of your comment here
Add time spent#ID time:1id:ID time:1
Add time spent and time remaining#ID time:4:8id:ID time:4:8
Update several entities at a time#ID, #ID comment: will not be fixed state:invalid time:0.5id:ID, id:ID comment: will not be fixed state:invalid time:0.5
All the actions in one commit message#456, #887 state:done time:3:0 comment:whoa! Everything is completed!id:456, id:887 state:done time:3:0 comment:whoa! Everything is completed!

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.

Commit Messages Format and Actions

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).

View Source

You can see all updates from Git in the Source tab:

View Source

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:

Import Git / GitHub Commits to Targetprocess. Image 7

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.

  • http://localserver:8080/
  • http://localserver:8080/tfs/

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:

Setup authentication with a TFS-based Git repository when Active Directory integration is configured

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

Find out more about our APIs, Plugins, Mashups and custom extensions. Join our community of passionate users and even discuss directly with our developers.