How to: Azure Repos Health Check on Azure DevOps

Vinicius Moura
2 min readNov 22, 2021

This script and report consolidate all information about Azure Repos (Branch policies, Commits Ahead/Behind and Pull Requests) within the Azure DevOps organization

This new report view in Azure Repos is the unification of 3 other blog reports (all REST APIs documentation used here are contained in each blog below):

The original script is available on my GitHub repository. See below this script:

All information is stored on Azure SQL tables. See the script below that contains all tables to Azure Repos:

After that, connect Power BI and select the tables below:

And format report information on different sessions:

  • Project Name (1) = Filter report using Project Name field;
  • Repository Name (2) = Filter report using Repository Name field;
  • Branch Name (3) = Filter report using Branch Name field;
  • Repository Information (4) = Information about Project Name, Repository Name and Default Branch that you select on filters;
  • Branch Policies information (5) = Information about all Branch Policies that you select on filters;
  • Branches Ahead/Behind (6) = compare branches to identify the gap between each branch and the default branch;
  • Pull Requests (7) = List all Pull Requests from the respective repository selected on filters.

--

--