Close a work item via the commit message

2020-08-13 05:20发布

问题:

Is there a way to close a work item using the commit message using VSTS? I tried: Fixes #123, Closes #123, or Resolves #123 but that only associates the commit to the work item.

So basically I am looking at closing issues via commit messages like in github: https://help.github.com/articles/closing-issues-via-commit-messages/ But using vs team services.

回答1:

No, there isn't any way to do this for now.

Similar question: TFS git commit change work item status

Feature request on VSTS User Voice: Update work items on commit for git



回答2:

Finally in 2019 they implemented this as a a light version of gitlab.

Using the keyword fix, fixes or fixed #ID will close the Workitem.

Detailed instructions: https://docs.microsoft.com/de-de/azure/devops/repos/git/resolution-mentions?view=azure-devops



回答3:

I followed this article and able to link work items using #ID. You can use the #ID control in pull request discussions, commit comments, changeset comments, and shelveset comments.