My Azure DevOps branch has a code coverage policy set up so that PRs must contain 80% diff coverage (i.e. 80% of the modified lines are covered). I am trying to pull via a REST API whether the diff coverage policy passed or not.
I tried using GET https://dev.azure.com/{organization}/{project}/_apis/policy/evaluations?artifactId=vstfs:///CodeReview/CodeReviewId/{projectId}/{pullRequestId}&api-version=6.1-preview.1, but in the response, the status of the codecoverage policy is "queued".
I believe this is related to the fact that in my Checks section of my PR, I see two code coverage checks: one check says myrepo/codecoverage is is "Waiting" status, and another says "Coverage status check succeeded for myrepo"
The above API is returning the Waiting codecoverage check but not the successful one. Is this because codecoverage is considered an external service? If so, how can I get the results?
I can get the full code coverage using this API: https://dev.azure.com/{organization}/{project}/_apis/test/codecoverage?buildId={buildId}&flags=7&api-version=6.1-preview.1, but again I am looking for the diff coverage.
Or is there something wrong with the branch policy setup such that the code coverage check is not updating itself and is instead leaving the waiting check and spawning a separate check? Thanks.
