These docs are for v4.6. Click to read the latest docs for v2023.

🚧

Codecov API v1 deprecation in progress

Please use the Codecov API v2. Documentation can be found here.

List pull requests

Each returned pull request will include the pull request base and head commits. Pagination applied.

GET /api/gh/:owner/:repo/pulls

Parameters

ParamDescription
stateFilter the list of pulls returned based on the pull request state determined by the service provider.
Choose: all, open, closed, merged. Default: open
sortSort the query results.
Choose: pullid, impact, updatestamp. Default: pullid
orderSpecify the sorting order.
Choose: desc, asc. Default: desc

Result

{
  "pulls": [
    {
      "pullid": 1915,
      "author": "<author obj>",
      "title": "pull request title",
      "updatestamp": "2016-08-19 14:38:26.970575+00:00",
      "state": "open",
      "diff": "<totals obj>",
      "totals": {
        "base": "<totals obj>",
        "head": "<totals obj>"
      },
      "head": {
        "message": "tip of pull request commit message",
        "totals": "<totals obj>",
        "ci_passed": true,
        "timestamp": "2016-08-19 14:26:02",
        "commitid": "df150e4be50ae09263107c3ea43d1a35f055bb71",
        "author": "<author obj>"
      },
      "base": {
        "message": "pull request base commit message",
        "totals": "<totals obj>",
        "ci_passed": true,
        "timestamp": "2016-08-17 22:22:32",
        "commitid": "010e063270be37cfa8547ccfb9717e5d874c88a8",
        "author": "<author obj>"
      }
    }
  ]
}

Get a single pull request

GET /api/gh/:owner/:repo/pull/1