0
votes

I am currently setting up a VSTS project for our team, and want to follow the MS approved 'One project with multiple areas' approach. I'd would like to silo the git repos on a per team basis (similar to how the work items work), however the teams all have the same members. Is this possible? Here's an example...

I create a project in VSTS, let's call it MainProject. I also have a team of 4 developers, and they are all members of a group in VSTS called MyDevGroup.

Under MainProject, I set up two teams, and two areas, let's call them Main Project / Team1 and MainProject / Team2. I add the group MyDevGroup separately to the security for those two teams. At this stage, if one of the team access this through VS, they can see those two teams, and if they were to add a new Work Item, depending on which team they had currently selected, it would assign it to the correct area. This is great.

I also create two git repos, let's call them MainProject / Repo1 and MainProject / Repo2, and assign Team1 at a contributor level to Repo1, and Team2 to Repo2. However, in VS, if the user is currently looking at MainProject / Project1 team, they can still clone either repo - they see both.

This is problematic, as you can imagine a scenario where a user might have the Team1 team selected in VS, but accidentally check out Repo2 and work on it.

So, is there a way to restrict a repo to a team?

EDIT: Further to this, I realise that once you open the solution in a particular repo, close VS then re-open it, it will refer to the correct repo. However it doesn't keep the reference to the correct team. It keeps the last team opened rather than the team I'd selected for the solution. Is there a way to have VS keep the team I had selected when I closed the solution?

EDIT 2: Duplicate of this - VSTS/TFS GUI: Auto-switch repository per team view?

1
Repositories hosted in VSTS team project are available for all the teams. For your situation, since different teams (Team1 and Team2) has the same members, why do you need the developers work for both Team1 and Team2 at the same time?Marina Liu
Well like I said, I don't want the team when they've selected 'Team1' in Visual Studio to accidentally work on Repo2. Team1 would be for one web application and Team2 would be for a different web application.benpage
As you found in the link (you showed), the direct answer is No. And another wordaround is hosted git repos in different team project if the code in Repo1 and Repo2 are quite different.Marina Liu
Yes - the problem with that approach is that we have multiple projects sharing infrastructure (IIS) and it would be nice to use deployment groups across projects but we can't do that.benpage

1 Answers

0
votes

As per this link, this is not possible with the current functionality of VSTS. Hopefully this will be possible in the future.