What Azure Repos records
Each pull request keeps its reviewers and their votes. In the REST API the vote is a number: 10 approved, 5 approved with suggestions, 0 no vote, -5 waiting for the author, and -10 rejected. Required reviewers from branch policies are marked as required. The pull request also records who created it, who completed it, when it was completed, and its merge status.
What an auditor usually wants
- every pull request merged into the protected branch in the period
- the author, and at least one approving reviewer who is not the author
- the date the pull request was completed, and when the approval was given
- a link back to the pull request
- evidence that branch policies required review, usually a screenshot of the policy settings
Getting it out of Azure DevOps
The pull request list in the web UI cannot be exported. The options are a script against the Pull Requests REST API, Analytics where it covers what you need, or an export tool.
PR & Pipeline History Export writes a Pull Requests sheet with id, title, repository, branches, author, dates, status, merge status, reviewers with their votes, iterations, comment threads and linked work item count, for the date window you choose. Filter to completed pull requests into your main branch, and you have the population an auditor samples from.
Checks worth running before you hand it over
- Filter for completed pull requests with no approving vote. Each one needs an explanation, such as a policy bypass by an administrator.
- Filter for pull requests where the only approver is the author.
- Compare against branch policy history: a gap may mean the policy was off for part of the period.
Keep the exported workbook with the date it was generated. Votes can change after the fact if a pull request is reopened.
One gap to know about: a reviewer's vote is stored as its current value, without the time it was cast. The export shows who approved and when the pull request was completed, not the minute each approval happened. If an auditor needs approval timestamps, they are in the pull request's activity timeline in the web UI, and in the pull request threads returned by the REST API, where vote changes appear as system comments with their own dates.
Approval evidence in one workbook
Free exports the last 30 days and the first 200 rows per sheet. Pro removes both limits for US$10/month per Azure DevOps organization.
See PR & Pipeline History Export for Azure DevOps Install from Visual Studio MarketplaceI'm the developer of PR & Pipeline History Export for Azure DevOps, so weigh this guide accordingly. Azure DevOps, Microsoft Word and Microsoft Excel are trademarks of Microsoft. This extension is independent and is not affiliated with or endorsed by Microsoft.