DEV Community

Utkarsh Shigihalli
Utkarsh Shigihalli

Posted on • Originally published at visualstudiogeeks.com on

Use a single repository for multiple wikis in Azure DevOps

This is a quick post to share how you can use a single Azure DevOps repository for multiple wikis in Azure DevOps. This approach will help you avoid creating multiple repositories for each wiki and manage them in a single repository.

Create a new repo for wiki

Firs lets create a separate repository for the wiki.

Create Repository
Create a repository

I want to create two wiki for two teams in my project. So I have created subfolders for each team in the repository and have placed sample markdown files in each folder. The idea is that each team will place their wiki content in their respective folder.

Folder Structure
Folder structure

Publish code as a new wiki

Now let us create a new wiki in Azure DevOps. Go to the project settings and click on the Wiki tab. We will publish a new code wiki.

Publish code as wiki
Publish code as wiki

Do the same for the second wiki.

Publish code as wiki
Publish code as wiki

This will create two wikis in the project.

show-wikis

Configure the wiki

As you can see that was easy. However, at it stands now, both the wikis are open for edits from all the team members. We need to restrict the access to the wiki content based on the team. We will make use of branch policies to achieve this.

Set the branch policy
Set the branch policy

Now, when any time changes are made to the wiki under 01-team-infra/* folder and a PR is created, Infra team will automatically be included as reviewers. Similarly, for the 02-team-app/* folder, App team will be included as reviewers.

pull-request
Pull request showing automatic reviewers added

That is it for this post. You can now use a single Azure DevOps repository for multiple wikis in Azure DevOps. As mentioned above, this approach will help you avoid creating multiple repositories for each wiki and manage them in a single repository.

Hope you enjoyed reading this.

Top comments (0)