How to: Create Pull Requests Dashboard on Azure DevOps

Vinicius Moura
3 min readMay 19, 2021

This Power BI report list Pull Request within the Azure DevOps organization

An original report is available on my GitHub repository. This report is based on an extension Pull Request Manager Hub, created by Carlos Ribeiro, to which I leave my acknowledgment for the great help to create this report.

In this specific report, I’m using OData to connect Azure DevOps. I have access to many tables on this link where I can select different information in Azure DevOps. To connect OData, the link below was used (here was created an Organization parameter):

https://analytics.dev.azure.com/{Organization}/_odata/v4.0-preview
  • After connection, was selected Projects table:
  • Here it was necessary to list all repositories for each project. To do this, was created a Custom Column that invoke REST API Repositories List, according to the following command:
= VSTS.Contents("https://dev.azure.com/" & Organization & "/" & [ProjectName] & "/_apis/git/repositories?api-version=6.0")
  • From the API execution, was created a new table Repos:
  • Now, it was necessary to list all pull requests for each repository. To do this, was created a Custom Column that invoke REST API Get Pull Requests, according to the following command:
= VSTS.Contents("https://dev.azure.com/" & Organization & "/" & [ProjectName] & "/_apis/git/repositories/" & [RepositoryId] &"/pullrequests?searchCriteria.includeLinks=true&searchCriteria.status=all&$top=100&api-version=6.0")
  • From the API execution, was created a new table PullRequests:
  • After creating all tables, this model is presented:
  • After creating all tables, it’s possible create a report
  • Team Project(1) = filter Team Projects;
  • Repositories (2) = filter Repositories;
  • Created By (3) = filter respective user that created a Pull Request;
  • Source Branch (4) = filter source branch for which the pull request was created;
  • Target Branch(5) = filter source branch for which the pull request was created;
  • Status (6) = Filter current status of the Pull Request;
  • Table (7) = List all Pull Requests from the selected filters.

--

--