Code Coverage
Get code coverage summary for a pull request
Retrieve aggregated code coverage statistics for a specific pull request in a repository. This endpoint provides overall coverage metrics as well as breakdowns by service and code owner.
post/api/v2/code-coverage/pr/summary
Request
- Base URLhttps://api.datadoghq.com
- Auth
- API key in header DD-API-KEY and API key in header DD-APPLICATION-KEY
- or OAuth 2Authorization code/oauth2/v1/authorizeToken URL/oauth2/v1/tokenScopescode_coverage_read
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"data": {
"attributes": {
"pr_number": 42,
"repository_url": "https://github.com/datadog/shopist"
},
"type": "ci_app_coverage_pr_summary_request"
}
}Response
OK
Example response
{
"data": {
"attributes": {
"evaluated_flags_count": 8,
"evaluated_reports_count": 12,
"patch_coverage": 70.1,
"total_coverage": 82.4
},
"id": "ZGQxMjM0NV9tYWluXzE3MDk1NjQwMDA=",
"type": "ci_app_coverage_summary"
}
}Changes
Changes to this operation have not been checked yet.