How to find all Completed PR's that have a rejection vote

Copper Contributor

Is there any way to utilize the standard API's that will give us rejection votes for all the Completed PR's?

One of my team's performance metrics is how many of your PR's have a rejection vote on them.  As such, we are looking for a good way to find all PR's that have a rejection vote.  This is easy for Abandoned PR's, as the regular /pullRequests? api will return all the votes for an abandoned API, so if the PR had been rejected at some point prior to being abandoned, i will see that rejection vote.  Unfortunately, the very same api, /pullRequests?, when asking for Completed PR's, 

/pullRequests?searchCriteria.status=completed, then the API does not return all votes, it only returns the last vote of the reviewer which approved the PR.  Thus, in order to find rejections on completed PR's, my team has to view each PR individually in TFS, and scroll down to see if any reviewer rejected the PR.  Considering we have around 400 to 500 PR's over the course of a year, this is not really feasible for us.  Is there any way to utilize the standard API's that will give us rejection votes for all the Completed PR's?
0 Replies