Skip to main content
POST
/
getMergeQueueTestingDetails
Get details about testing that Merge Queue is performing
curl --request POST \
  --url https://api.trunk.io/v1/getMergeQueueTestingDetails \
  --header 'Content-Type: application/json' \
  --header 'x-api-token: <api-key>' \
  --data '
{
  "repo": {
    "host": "<string>",
    "owner": "<string>",
    "name": "<string>"
  },
  "testRunId": "<string>",
  "targetBranch": "<string>"
}
'
{
  "requiredStatuses": [
    "<string>"
  ],
  "testBranch": "<string>",
  "testBranchSha": "<string>",
  "checkSuites": [
    {
      "checkRuns": [
        {
          "name": "<string>",
          "url": "<string>"
        }
      ]
    }
  ],
  "statusChecks": [
    {
      "context": "<string>",
      "url": "<string>"
    }
  ],
  "testedPullRequests": [
    {
      "prNumber": 123,
      "prUrl": "<string>",
      "title": "<string>"
    }
  ],
  "createdAt": "<string>",
  "impactedTargets": [
    "<string>"
  ],
  "impactedTargetsForTestedPrs": [
    "<string>"
  ],
  "dependentPrs": [
    123
  ]
}

Documentation Index

Fetch the complete documentation index at: https://trunk-4cab4936-sam-gutentag-flaky-tests-new-monitors.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

x-api-token
string
header
required

Body

application/json
repo
object
required

The repository whose merge queue is running the test run.

testRunId
string
required
targetBranch
string
required

The target branch of the merge queue that is running the test run (e.g. main).

Response

OK

requiredStatuses
string[]
required

The list of status check names that must all pass for the test run to succeed and its PRs to merge.

testBranch
string
required

The name of the temporary branch the merge queue created to run tests against (e.g. trunk-merge/pr-1815/5df78918-...).

testBranchSha
string
required

The commit SHA at the tip of the test branch that the test run was started on.

checkSuites
object[]
required

GitHub check suites reported against the test branch.

statusChecks
object[]
required

GitHub commit status checks reported against the test branch SHA.

testedPullRequests
object[]
required

The pull requests that this test run is testing. Contains multiple entries when batching is enabled.

requiredStatusesSource
enum<string>

Where the merge queue sourced the list of required statuses from. trunk_config — from the repository's .trunk/trunk.yaml. repo_provider_branch_protection — from the Git provider's branch protection settings (e.g. GitHub branch protection rules). merge_instance — from the merge queue's own configuration (e.g. set via the API).

Available options:
trunk_config,
repo_provider_branch_protection,
merge_instance
createdAt
string

ISO 8601 timestamp of when the test run was created.

status
enum<string>

The status of a merge queue test run. in_progress — tests are currently running. succeeded — all required statuses passed. failed — at least one required status failed. cancelled — the test run was cancelled before completion.

Available options:
in_progress,
failed,
cancelled,
succeeded
impactedTargets
string[]

The union of impacted build/test targets across all PRs involved in the test run, including any dependent PRs previously merged into the test branch. Only present when impacted targets are being uploaded for the repository.

impactedTargetsForTestedPrs
string[]

The impacted build/test targets for only the PRs being tested in this run (i.e. testedPullRequests), excluding any dependent PRs. Only present when impacted targets are being uploaded for the repository.

dependentPrs
number[]

PR numbers of other PRs this test run depends on but is not itself testing. Populated in parallel-mode queues when previously-passed PRs ahead of the tested PR are merged into the test branch to form the predicted base.