3
votes

We are trying to migrate our code base to VSTS. Our developers have referenced work items (bugs) in their commit messages.

VSTS is interpreting these numbers such as #3235 when processing the commit messages.

For example when we push our code to VSTS it interprets the #3235 and automatically associates a work item.

We would like to change/disable this setting in VSTS, or find a work around.

example commit message:

commit 8bb44596: Merge pull request #3139 in Production\system from 3641_Bug to Dev, this is automatically linked to #3139 work item which is not desired.

If possible we would like to use the VSTS item in brackets e.g [vsts: 3159]

It is not realistic to manually edit every commit message.

1
Seems git config git-tfs.work-item-regex “work-item #(?<item_id>\d+) just work for git-tfs.tear
This would work if we were using on-prem TFS, but we are using VSTS the cloud version of tfs which Microsoft has control of the config.scranley

1 Answers

2
votes
  1. Navigate to the Version Control settings
    a. https://company-name.visualstudio.com/project-name/_admin/_versioncontrol?_a=security
    b. Make sure to change to match your project name
  2. Click on the repository you are pushing to
  3. Click Options
  4. Deselect Automatically create links for work items mentioned in a commit comment enter image description here

  5. Once you are done migrating, you can recheck Automatically create links for work items mentioned in a commit comment.