Your browser may have trouble rendering this page. See supported browsers for more information.

|<<>>|12 of 73 Show listMobile Mode

Closed: Not a bugWill not fix

Published by marco on

Updated by marco on

 It's not a bug, it's a featureThe issue report Can’t edit Wiki after default branch policy applied (Microsoft Developer Community: Azure DevOps) is about a nice feature in Azure DevOps called Branch Policies that allows you to protect the default branch in a given repository, or in all repositories. If you have a lot of repositories, it’s quite convenient to be able to set it once for all of them.

However.

However, Azure DevOps also has a nice feature called the Project Wiki, which includes an online editor that makes editing easy enough for any user with even the most basic technical skill-set (whether developer, supporter, project manager, or product owner).

The Project Wiki is backed by a Git repository. As soon as you set a default branch policy for all repositories in a project, it affects this repository as well. If you protect the default branch, then users will only be able to edit the Wiki by cloning the repository, creating a branch, committing changes there, and then creating a pull request. This workflow locks out a considerable number of users who were able to participate before.

Microsoft closed this issue as “Not a bug” because they said that applying branch policies to all repositories is “by design”. What they actually meant was that they “will not fix” it. It’s a bug. There’s even a name for it: it’s called a leaky abstraction. Whereas users were able to edit the Wiki before without knowing anything about Git, with branch policies enabled, they are suddenly confronted with the underlying abstraction. It has “leaked”.

There are workarounds: instead of setting branch policies to protect the “default” branch, you can set your branch policy to apply to “master” or “main” (or both). This policy won’t apply to the Wiki repository because the default branch there is named “wikiMaster” (presumably for exactly this workaround).