简体   繁体   中英

Can Visual Studio require a work item be linked to a git commit?

Using Visual Studio 2015, TFS 2015 and Git, is there any way to enforce or remind me to link a work item on check-in? Or is it possible in newer versions of VS / TFS? VS extension?

What I want:

Visual Studio更改窗口

This has been asked before, but not in the past 2 years.

I will persue this option if there really isn't anything else available: Write a plugin: http://almsports.net/tfs-server-side-check-in-policy-for-git-repositories/1025/

Seems you just want enforce commit policy in TFS with GIT repository, this is still not supported out of the box currently .

It is however on the product teams backlog and you could only use the Tfs-Git ProcessEvent hook just as the blog posted in your question for now.

You can require it as part of a pull request. The Visual Studio integration you see for TFVC is implemented in the form of a source control checkin policy, of which there is no equivalent for Git. Use pull requests, instead.

I'd recommend against writing server-side TFS plugins in almost every case; they represent a potentially big barrier to upgrades down the line, and totally block you from ever pursuing moving to VS Team Services unless you stop using the plugin. It's better to find solutions that don't involve checkin policies.

Your TFS Admin can perform this (or someone with administrative permissions). The change can either be done for the collection or for a specific project. This means that everyone will get the policy warning. The VS-TFS Power Tools add-on will be required.

In VS > Team > Team Project (Collection) Settings > Source Control... > Check In Policy > Add > Work Items

在此输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM