Sponsor: Do you build complex software systems? See how NServiceBus makes it easier to design, build, and manage software systems that use message queues to achieve loose coupling. Get started for free.
Want to produce better code and more efficient development group? Start using Visual Studio Online check-in policies within your team project.
Check-in Policies are rules you can define at a Visual Studio Online team project which are enforced when a developer attempts to check-in their source code.
Note: You must be using Team Foundation Version Control (TFVC) with your project in order to use the check-in policies. Although VSO now supports Git as a version control system for your team project, check-in policies are not supported.
One of the main reasons I started using check-in policies was to enforce associated work items to a changeset. Having all changsets associated to work enabled me to automate the creation of a change lot during the build process. If you are looking for better way to visualize your Visual Studio Online work items, take a look at my LeanKit Visual Studio Online Integration
Source Control Settings
From the Team Explorer, access the settings menu and select Source Control under the Team Project heading.
Under the Check-in Policy tab, click the Add button to select the policy you want to add.
Without any extension or power tools, Visual Studio Online provides four team project check-in policies that you can specify:
Requires that the latest build was successful for each affected continuous integration build definition.
Changeset Comments Policy
Requires the developer to provide comments with the check-in. These comments will be associated with the changeset.
Requires the developer to run Code Analysis from Visual Studio prior to check-in.
Requires the developer to associate at least one work item with the check- in.
Code Review Policy
There is a great policy written by Colin Dembovsky (@colindembovsky)
on Visual Studio Gallery
that provides Code Review Policy.
Once the extension is installed you will now have a new option available to add.
Once this policy is added, you will be unable to check-in until a Code Review has been requested, closed, and has no “Needs Work” response.
One thought to “Visual Studio Online Check-In Policies”
Using Colin’s plugin, the checkin policy is not satisfied even after closing the code review request ,any idea ?
Removing cache didnt do the trick