How to remove broken Wiki entries in Azure Devops?

1.2k Views Asked by At

We created automated release notes to be generated in AzureDevops wiki using Release tasks in AzureDevops

enter image description here

enter image description here

However during testing some incorrect entries were created in AzureDevops wiki.

It is impossible to remove them using GUI or azure devops CLI.

  1. First issue

Error about inocrrect path is shown for a page (both from UI and CLI)

enter image description here

  1. Second issue

Broken folder. There is no ,,More..." option available from UI. Azure devops CLI gives no option to remove folders.

enter image description here

If i Click it we can see

enter image description here

Is there any other way ?

Regards.

2

There are 2 best solutions below

0
On BEST ANSWER

One of my friends managed to solve this.

The underlying issue it seems is that UI in the backEnd doesn't save paths with spaces but rather with '-' chars.

So if we create on UI folder 'some items' it will be saved in backEnd as 'some-items'

Since we used automation to try to create articles under that folder and used the version with no '-' it somehow broke the wikis UI.

Solution:

In case if some entries are broken we can use git clone to clone wiki repo and fix it (delete incorrect folders, files) on windows or linux (we used linux since there were some additional problems on windows). Then after fixes are applied commit push it back up.

enter image description here

6
On

You can try Azure Devops CLI or REST api to see if this works.

Azure Devops CLI:

To delete a wiki page, enter the az devops wiki page delete command.

az devops wiki page delete --path
                           --wiki
                           [--comment]
                           [--project]
                           [--subscription]
                           [--yes]

REST api:

Deletes the wiki corresponding to the wiki name or Id provided.

DELETE https://dev.azure.com/{organization}/{project}/_apis/wiki/wikis/{wikiIdentifier}?api-version=5.1