Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to force Code Review before Check-In in TFS 2012 RC?

I've just installed TFS 2012 RC and Visual Studio 2012 RC. I see some interesting feartures: Code Review, Build Success before check-in. But it do not! So my question is:

  1. How to force Code Review before Check-In in TFS 2012 RC?
  2. How to force "Builds" Check-in Policy (not Gated Check-in)?
  3. What difference between "Builds" Check-in Policy and "Gated Check-in"?
like image 915
Vinh Avatar asked Jul 30 '12 03:07

Vinh


People also ask

How do you link a code review changeset in TFS?

Using the TFS Web InterfaceEnter the code review id in the Search work items field. Navigate to the Links tab, scroll down to the Changeset control, and click Link to. Enter the changeset id and click OK.


2 Answers

1) In team explorer, go to the "Settings" section. Choose "Source Control". When the window pops up, select the "Check-in Policy" tab. Click "add" and select the options you need.

2) Create a new build. On the "Trigger" tab, change to "Continuous Integration". This will force a build with every check in.

3) Gated check in requires a successful build to check in. Continuous Integration (CI) builds on check in (both options are found on the trigger tab in the build settings, and you can actually have both on different builds) A gated check in will basically store your check in as a changeset, run a build on it, and deny the check in if the build fails. CI checks in your code and runs a build, which may or may not fail.

Hope that helps!

like image 184
Andrew Clear Avatar answered Jan 03 '23 03:01

Andrew Clear


There are a couple of Code Review checkin policies that you can install in Visual Studio and configure for you Team Project. These will enforce that a Code Review work item is linked to the changes before you can check them in:

  • Colin's ALM Checkin Policy Pack for Visual Studio
    • 2017
    • 2015
    • 2013
    • 2012

enter image description here

like image 40
jessehouwing Avatar answered Jan 03 '23 04:01

jessehouwing