Jonn
Jonn

Reputation: 4661

Require Pull Request in TFS

Pull Requests were recently implemented in TFS. Is there a way to force users to make Pull Requests, and have others review it before they can merge into a branch?

I've tried restricting Contribute permissions to the branch for a TFS group, but that prevented them from merging through Pull Requests too.

Upvotes: 10

Views: 4476

Answers (3)

Johan Classon
Johan Classon

Reputation: 1191

You tagged your question with TFS 2013, and I think that what you strictly ask for is not possible.

But in TFS 2015 and VSO you can access a feature called Branch Policies under the team project settings -> Version Control -> Click your Repository -> Branch Policies.

Well there you tick Require a minimum number of reviewers per pull request. If it is important that other make the review, make sure that Allow users to approve their own changes is not checked.

I have written a blog post which describes it in more detail.

Upvotes: 14

kevindaub
kevindaub

Reputation: 3363

I was able to get around this by creating 2 separate groups: Approvers and Contributors. I then restricted the contributors from contributing to a specific branch and only allowed the approvers.

The key difference is that the approvers aren't in the contributors and vice-versa.

If people are in both groups, I would suggest giving the approvers a secondary account until TFS 2015 is available. This doesn't keep the approvers from pushing changes without a pull request, but at least this gets you in the right direction.

Upvotes: 1

Buck Hodges
Buck Hodges

Reputation: 3352

There is a feature in TFS 2015 that will support this (it is not in CTP1 that was just released).

Upvotes: 2

Related Questions