I am trying to do some code coverage analysis, and we enabled codecov on our opensource projec. but I can get the following information:
- patch % of a PR
- the response json explaination anyone could help on this? thanks a lot in advanced https://docs.codecov.com/reference/repos_report_retrieve
Tom from Codecov here. So, patch coverage inherently is between two commits. You can use the comparison endpoint to get patch data.
As an example, this is the URL (https://api.codecov.io/api/v2/github/codecov/repos/example-python/compare/?pullid=114) for pull request 114 on the repo codecov/example-python. Note that you may need an API key.
The response generated includes
You are looking for
totals.patch.coverage(100.0) which matches what is shown in Codecov.