filter
default

Find code check runs that match the specified query. [What a code check run is exactly.](https://docs.github.com/en/rest/guides/getting-started-with-the-checks-api#about-check-runs)

Changed on
post/filter/code_checks

Request

Request body

inRepositoryID[] required

Set of repositories. An empty list raises a bad response 400. Duplicates are automatically ignored.

triggered_byDeveloperID[]

Check runs must be triggered by commits pushed by these people. When it is impossible to determine who pushed, e.g. in legacy API based checks, they are committers. It is possible to mention whole teams using the syntax {id} where id is a team identifier (see /teams).

labels_includestring[]

At least one of these labels must be present in the checked PRs.

labels_excludestring[]

None of these labels must be present in each checked PR.

date_fromstring date required

Date from when to start measuring the metrics.

date_tostring date required

Date until which to measure the metrics.

timezoneinteger

Local time zone offset in minutes, used to adjust date_from and date_to.

accountinteger required

Session account ID.

quantilesnumber[]

Cut the distributions at certain quantiles. The default values are [0, 1] which means no cutting.

Example request

{
  "in": [
    "github.com/athenianco/athenian-webapp",
    "github.com/athenianco/athenian-api"
  ],
  "triggered_by": [
    "github.com/vmarkovtsev",
    "github.com/se7entyse7en"
  ],
  "date_from": "2020-05-01",
  "date_to": "2021-05-01",
  "timezone": 120,
  "account": 1
}

Response

Code check runs that satisfy the specified filters.

timelinestring[] required

Sequence of dates from date_from till date_to. We choose the adaptive intervals by applying these rules on (date_to - date_from):

  • Less than 5 weeks: daily.
  • Less than 5 months: weekly (not aligned).
  • Aligned monthly.

Example response

{
  "items": [
    {
      "title": "Unit tests",
      "repository": "github.com/src-d/athenian-api",
      "last_execution_time": "2021-05-18T11:47:42Z",
      "last_execution_url": "https://github.com/athenianco/athenian-api/pull/1448/checks?check_run_id=2610787628",
      "size_groups": [
        3,
        5,
        8
      ],
      "total_stats": {
        "count": 100,
        "successes": 50,
        "critical": true,
        "mean_execution_time": "200s",
        "stddev_execution_time": "20s",
        "median_execution_time": "120s",
        "skips": 30,
        "flaky_count": 0,
        "count_timeline": [
          0,
          20,
          40,
          10
        ],
        "successes_timeline": [
          0,
          10,
          20,
          5
        ],
        "mean_execution_time_timeline": [
          "150s",
          "160s",
          "210s",
          "180s"
        ],
        "median_execution_time_timeline": [
          "110s",
          "100s",
          "125s",
          "110s"
        ]
      },
      "prs_stats": {
        "count": 100,
        "successes": 50,
        "critical": true,
        "mean_execution_time": "200s",
        "stddev_execution_time": "30s",
        "median_execution_time": "120s",
        "skips": 30,
        "flaky_count": 0,
        "count_timeline": [
          0,
          20,
          40,
          0
        ],
        "successes_timeline": [
          0,
          10,
          20,
          0
        ],
        "mean_execution_time_timeline": [
          "170s",
          "160s",
          "210s",
          "205s"
        ],
        "median_execution_time_timeline": [
          "175s",
          "100s",
          "125s",
          "120s"
        ]
      }
    }
  ],
  "timeline": [
    "2020-05-01",
    "2020-05-02",
    "2020-05-03",
    "2020-05-04"
  ]
}

Changes

    • info

      added the new optional request property /////