---
title: "List the test runs of a commit"
method: GET
path: "/ci/{owner}/repositories/{repository}/tests/runs"
tags: ["test_insights"]
---

# List the test runs of a commit

`GET /ci/{owner}/repositories/{repository}/tests/runs`

## Request

- Base URL: `https://api.mergify.com/v1`
- URL: `https://api.mergify.com/v1/ci/{owner}/repositories/{repository}/tests/runs`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer
- TypeScript: <https://skmtc.dev/mergify/apis/mergify-api/docs/ci/:owner/repositories/:repository/tests/runs/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns every name test results arrived under for the commit, with the runs received under it -- one per leg or shard -- how they were sent, and whether they arrived whole; and whether the repository accepts test results at all. Read from Test Engine's own data only: a CI job missing from the list sent nothing Mergify received.

## Path parameters

- `repository` string, required: The name of the repository
- `owner` string, required: The owner of the repository

## Query parameters

- `head_sha` string, required: The full SHA of the commit whose test runs to list.

## Response `200`

Successful Response

- TestRunsResponse
  - `head_sha` string, required: The commit the results were sent for.
  - `test_results_ingestion` 'enabled' | 'not_enabled' | 'paused', required: Whether Mergify accepts test results for this repository: `not_enabled` when CI Insights is not enabled on it, so every upload is refused; `paused` when ingestion is paused for its organization.
  - `pending_uploads` integer, required: Uploads to this repository still waiting to be ingested that arrived since this commit's first test run began, from this commit or another, counted up to 5000.
  - `jobs` JobTestRuns[], required: Every name test results arrived under for this commit. A CI job missing here sent nothing Mergify received: check in the CI provider whether it ran.
    - `pipeline_name` string, nullable, required: The pipeline name the results were sent under.
    - `job_name` string, nullable, required: The job name the results were sent under: `MERGIFY_TEST_JOB_NAME` when set, else the provider's own job name (on GitHub Actions the job id, not its displayed name).
    - `test_results` 'results_received' | 'upload_error' | 'ingesting', required: `results_received` when every run received so far arrived whole; `upload_error` when a run arrived incomplete or unreadable; `ingesting` while part of a run is still waiting to be ingested.
    - `test_runs` TestRun[], required: The runs of the job's latest CI run, every attempt, in the order they ended: one per leg or shard, plus any re-run beside the run it repeats.
      - `job_leg` string, nullable, required: The leg of a matrix or sharded job the run named, when the client names one; no released client does yet.
      - `run_attempt` integer, nullable, required: The CI run attempt that sent the results, when the provider has one.
      - `framework` string, nullable, required: The test framework, such as `pytest`.
      - `framework_version` string, nullable, required: The version of the test framework.
      - `uploader` TestRunUploader, required
        - `method` 'plugin' | 'report' | 'unknown', required: How the results were sent: `plugin` for a test framework plugin, `report` for a report file converted by `mergify ci junit-process`, `unknown` when the upload did not say.
        - `name` string, nullable, required: The client that sent the results, as it named itself.
        - `version` string, nullable, required: The version of that client, as it reported it.
      - `tests` integer, required: How many test results were received.
      - `failed` integer, required: How many of them failed.
      - `skipped` integer, required: How many of them were skipped.
      - `dropped_tests` integer, required: Test results the upload said it left out, or that could not be stored.
      - `ingestion` 'complete' | 'in_progress' | 'incomplete', required: `complete` when no part the upload declared is missing and none was left out or unreadable; `in_progress` while declared parts are missing but uploads to the repository that arrived around the run are still waiting to be ingested; `incomplete` when parts are missing, unreadable or were left out.
      - `ended_at` string, date-time, required: When the test run ended.

## Other responses

- `403`: Forbidden
- `404`: Not found
- `409`: Conflict
- `422`: Unprocessable entity

## Changes

- **2026-10-23** `f9abe9fcb6e6`: 2 warning, 2 info
  - added the new `in_progress` enum value to the `jobs/items/test_runs/items/ingestion` response property for the response status `200`
  - added the new `ingesting` enum value to the `jobs/items/test_results` response property for the response status `200`
  - added the required property `pending_uploads` to the response with the `200` status
  - added the required property `test_results_ingestion` to the response with the `200` status
- **2026-10-23** `628c80a6ba45`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/mergify/apis/mergify-api/changes/ci/:owner/repositories/:repository/tests/runs/get.md)

---

[API](https://skmtc.dev/mergify/apis/mergify-api.md) - [All operations](https://skmtc.dev/mergify/apis/mergify-api/llms.txt) - [OpenAPI document](https://skmtc.dev/mergify/apis/mergify-api/revisions/dc948b85a8dc?raw)
