How do I search for links in Azure DevOps Wiki?

484 Views Asked by At

I am working on a POC for a new step in our CI pipeline.
The idea is to detect links in our Wiki that point to the code, so that when a file is changed in a pull request, if that file is referenced in a wiki page then a comment is posted on the PR saying "make sure you update [wiki page]".

I've been using the DevOps Wiki Search Results REST API trying to detect the name of a code file, but it seems that the search API only searches in the page's text and that does not include links.

To illustrate, in the following markdown, myClass is found but myClass.cs is not.

# Section
This is a section about a topic.\
This is implemented in code in the [myClass](https://link-to-code.com/myClass.cs) class.

Does anyone know how to include the whole markdown in the search? Or if there is another way to access Azure wiki that allows this? Ideally we shouldn't have to explicitely mention the file name in the wiki text.

0

There are 0 best solutions below