Git: How to enforce a Work Item Linkage Check in P

2020-05-01 08:58发布

问题:

I wanted to apply a check in policy in VSTS Git in which whenever a new check in is happening there should be check in policy in which work item linkage is mandatory.

I could not find this functionality in VSTS GIT check in policies, has anyone here done this before, then please guide.

回答1:

For git, you can use branch police to check for linked work items.

Instead of pushing change to the target branch directly, you can checkout a source branch from the target branch. Make changes on the source branch. When you create a PR to merge the changes from source branch into target branch, the pull request will check the linked work items before merging.