How to: Create Pull Requests Dashboard on Azure DevOps

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.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Vinicius Moura

Vinicius Moura

Tech Solution Architect Manager na Accenture