Merge Queue

Control merge queue state — pause, unpause, and inspect status.


Get branches with active merge queues #

GET /repos/{owner}/{repository}/merge-queue/branches

Get the list of branches that currently have active merge queues

Application key permission: merge_queue: read.

Application Key Admin Application Key OIDC CI Token Mergify User Token
repository string required

The name of the repository

min length: 1 · max length: 100 · pattern: ^[\w\-\.]+$

owner string required

The owner of the repository

min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$

200 Successful Response
branchesstring[]required

List of branches with active merge queues

Example Response
                        {
  "branches": [
    "string"
  ]
}
                      
400 API_VERSION_UNKNOWN: The Mergify-Version header names an API version this server does not serve. served_versions lists the versions it serves, each at the newest point this server serves (YYYY-MM-DD.N).

Body: APIVersionUnknownBody

403 APPLICATION_KEY_REFUSED: The application key lacks the permission the request needs, or the request names an account or repository of another organization. CI_TOKEN_REFUSED: The Mergify OIDC CI token has expired, lacks the permission the request needs, or the request does not name the repository it was issued for.

Body: CredentialRefusedBody

404 Not found
409 Conflict
422 CONFIGURATION_INVALID: The repository's Mergify configuration is invalid. extended_repository names the repository its extends points to when the error is in that repository's configuration file, and is null otherwise, including when the error only appears once the two configurations are merged. The route's other 422s carry no error_code.

Body: ConfigurationInvalidBody

Example Request
curl -X GET "https://api.mergify.com/v1/repos/:owner/:repository/merge-queue/branches" \
  -H "Authorization: Bearer <token>"

Get the current status of the merge queue #

GET /repos/{owner}/{repository}/merge-queue/status

Get the current status of the speculative checks, batches, and queued pull requests in the merge queue

Application key permission: merge_queue: read.

Application Key Admin Application Key OIDC CI Token Mergify User Token
repository string required

The name of the repository

min length: 1 · max length: 100 · pattern: ^[\w\-\.]+$

owner string required

The owner of the repository

min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$

branch string

The name of the branch

200 Successful Response
batchesMergeQueueStatusBatchWithSubBatch[]required
idstring <uuid>required
namestringrequired
parent_idsstring <uuid>[]required
statusBatchStatusrequired
code"running" | "bisecting" | "preparing" | "failed" | "merged" | "waiting_for_merge" | "waiting_for_previous_batches" | "waiting_for_requeue" | "waiting_schedule" | "waiting_for_batch" | "waiting_for_checks_slot" | "frozen"required
Enum: running bisecting preparing failed merged waiting_for_merge waiting_for_previous_batches waiting_for_requeue waiting_schedule waiting_for_batch waiting_for_checks_slot frozen see Batch Status
batch_filled_slotsinteger | null
max_batch_slotsinteger | null
batch_max_start_atstring <date-time> | null
retriesinteger
max_retriesinteger
started_atstring <date-time> | nullrequired
estimated_merge_atstring <date-time> | nullrequired
estimated_ci_finish_atstring <date-time> | nullrequired
ci_finished_atstring <date-time> | nullrequired
scopesstring[]required
queue_rule_namestringrequired
checks_summaryBatchChecksSummaryrequired
passedintegerrequired
totalintegerrequired
succeededintegerrequired

How many of the total checks concluded as a success, neutral or skipped.

failedintegerrequired

How many of the total checks concluded as a failure, an error, cancelled, timed out or requiring an action.

runningintegerrequired

How many of the total checks are still running on the batch's current run.

pendingintegerrequired

How many of the total checks have not reported on the batch's current run yet, or went stale without concluding.

pull_requestsMergeQueueStatusPullRequest[]required
numberintegerrequired
min: 1 · max: 9223372036854776000
titlestringrequired
urlstringrequired
authorPullRequestAuthorrequired
idintegerrequired
loginstringrequired
avatar_urlstring | nullrequired

The account's avatar URL, as GitHub reports it. Null when it is not known.

queued_atstring <date-time>required
priority_aliasstringrequired
priority_rule_namestringrequired
labelsstring[]required
scopesstring[]required
queue_state_labelsstring[]required

The names of the labels the merge queue configuration has Mergify add for a pull request's queue state (merge_queue.queued_label, merge_queue.checking_label and merge_queue.dequeued_label), rendered for this pull request. The pull request does not necessarily carry all of them: they are listed so a client can tell them apart from its other labels, since this status already reports the queue state they stand for. Empty when none of these options is set.

all_scopesboolean | null

Whether the pull request impacts every scope (a merge-queue barrier: the pull requests queued behind it merge only after it, and when its checks run on a draft pull request, that draft carries every pull request queued ahead of it, whatever their scopes; in isolated merge queue mode, where no batch depends on another, it is tested on its own, and the pull requests queued behind it that are not barriers do not wait for it).false for an ordinary scoped pull request.

github_labelsPullRequestLabel[] | null
idintegerrequired
namestringrequired
colorstringrequired
defaultbooleanrequired
estimated_merge_atstring <date-time> | null

When the pull request is estimated to merge, null when it cannot be estimated. Always null for a pull request in a batch, which merges at its batch's estimated_merge_at, unless it leaves its batch (leaves_its_batch).

estimated_ci_finish_atstring <date-time> | null

When the checks the pull request merges after are estimated to end, null when they cannot be estimated. Always null for a pull request in a batch, whose checks are its batch's (estimated_ci_finish_at), unless it leaves its batch (leaves_its_batch).

conflict_with_pull_requestsinteger[] | null
conflict_resolution_advicePreviewstring | null

Set on a waiting pull request held back by a conflict that automatic conflict resolution could merge if it were turned on, or if the queue used a merge method that applies it: a one-line hint saying so and where to turn it on, as the markdown the pull request's conflict reason carries. null otherwise: on a queue whose conflict_resolvers already ran, and on a conflict no strategy is handed, such as a file deleted on one side.

conflicts_with_no_pull_request_aheadboolean | null

Set on a waiting pull request held back by a conflict, beside conflict_with_pull_requests. true when none of the pull requests ahead the merge queue deferred it behind changes a file the conflict stopped on: the conflict is then with the queue's branch, so their leaving the queue does not resolve it, and the pull request is dequeued unless it is updated with that branch. false when one of them may cause it. null when no conflict holds the pull request back.

batch_reasonBatchReason | null
kind"scope" | "directory" | "queue_order"required
Enum: scope directory queue_order
shared_scopesstring[]required
shared_directoriesstring[]required
peer_pull_request_numbersinteger[]required
affinity_scorenumberrequired
is_frozenboolean | null

Whether an ongoing scheduled freeze holds this pull request's merge, independent of its CI status — it can be running CI and is_frozen at once. false when no freeze affects it.

dequeue_requestedboolean | null

Whether a manual removal from the queue is pending for this pull request: it was removed via the 'Remove from queue' action / @mergifyio dequeue command (or is a stacked pull request that cascade removes with one), and is awaiting completion. The pull request remains listed until it is actually removed. false when no manual removal is pending; automatic dequeues (merge, CI failure, push) do not set it.

depends_on_pull_requestsinteger[] | null

Pull request numbers this one is queued behind because it depends on them: the same-repo stack predecessors the merge queue holds it behind (it declared a Depends-On: on the stack). It merges after them. null when there is no such queued dependency.

leaves_its_batchboolean | null

Whether this pull request leaves its batch to merge without it: the batch waits for a merge schedule that this pull request does not need, so the merge queue requeues this one without the pull requests that schedule holds, and it runs its checks again. Its estimated_merge_at and estimated_ci_finish_at are then its own, never its batch's, and null when they cannot be estimated, as behind a frozen batch; the batch's are those of the pull requests it keeps, null when it keeps none. false for a pull request that merges with its batch, and for one waiting.

waiting_reasonWaitingReason | nullrequired

Why the merge queue keeps this pull request out of the batches it checks. null for a pull request in one of those batches, for one none of these codes describes, and when the queue cannot tell, as while a batch ahead that failed its checks is being handled. While the queue is paused (pause in the queue's status), it is null or one of waiting_for_base, conflict_with_pull_requests_ahead, conflict_with_base_branch, waiting_for_stack_predecessor, waiting_for_schedule.

code"waiting_for_base" | "conflict_with_pull_requests_ahead" | "conflict_with_base_branch" | "waiting_for_checks_slot" | "waiting_for_scope_capacity" | "waiting_for_bisection" | "waiting_for_held_stack_predecessor" | "waiting_for_stack_predecessor" | "waiting_for_schedule" | "waiting_for_batch"required
Enum: waiting_for_base conflict_with_pull_requests_ahead conflict_with_base_branch waiting_for_checks_slot waiting_for_scope_capacity waiting_for_bisection waiting_for_held_stack_predecessor waiting_for_stack_predecessor waiting_for_schedule waiting_for_batch
pull_request_numbersinteger[]required

The pull requests the code names, as its description says, up to the first 100. Empty for a code that names none.

scopesstring[]required

For waiting_for_scope_capacity, the scopes of the pull request with no room left, up to the first 100. Empty for the other codes.

blocks_every_scopebooleanrequired

For waiting_for_bisection, true when no batch starts in any scope until the failed checks are resolved, as in a serial queue, and false when only the scopes the failed batches share with this pull request wait. false for the other codes.

all_scopesboolean | null

Whether the batch impacts every scope (a merge-queue barrier: the pull requests queued behind it merge only after it, and when its checks run on a draft pull request, that draft carries every pull request queued ahead of it, whatever their scopes; in isolated merge queue mode, where no batch depends on another, it is tested on its own, and the pull requests queued behind it that are not barriers do not wait for it).false for an ordinary scoped batch.

checks_timeout_atstring <date-time> | null

When the checks will time out and the batch be dequeued. Null when no checks timeout applies, while no checks run (before they first start, and until a new draft's start), and once they concluded: the time the batch waits does not count. Checks that read pending again, or start over on an edit to the batch branch or a new draft, get a whole timeout from then.

intermediate_results_skippedboolean

True when this batch merged (or is set to merge) without its own CI passing, because later downstream batches that include its changes succeeded and tested every scope it touches between them (skip_intermediate_results).

queue_pull_request_numberinteger | null

The number of the pull request the queue checks run on: the draft pull request, or the pull request itself when it is checked in place or the check is trusted. Null when they run on a merge queue branch with no draft pull request: head_sha and queue_branch_name name it then. Null too while the batch's checks have not started, or failed to.

head_shastring | null

The commit the queue check is about: the head of the merge queue branch the checks run on, or of the pull request itself when it is checked in place or the check is trusted. A trusted check runs no queue CI: that commit's own green CI stands in for it. Null while the batch's checks have not started, or failed to.

queue_branch_namestring | null

The merge queue branch the queue checks run on. Null when the pull request is checked in place, or when the check is trusted. Null while the batch's checks have not started, or failed to.

frozen_batch_aheadFrozenBatchAhead | null

The batch ahead a scheduled freeze holds, and with it this batch: this batch merges only once that one has, however green its own checks are. The batch ahead may still be running its checks. null when no frozen batch is ahead, including when this batch is frozen itself, which its pull requests' is_frozen reports.

idstring <uuid>required

The id of the batch ahead, as batches or a bisection's sub_batches list it.

pull_request_numbersinteger[]required

The pull requests queued in the batch ahead.

awaited_stack_predecessorsinteger[]

The pull requests this batch is stacked on that must merge before it: its checks passed, and as a stack merges from the bottom up, it merges once they have, and its estimated_merge_at is no earlier than theirs. Empty when it waits for none. A batch being bisected lists none itself: each of its sub_batches lists its own.

sub_batchesMergeQueueStatusBatchWithSubBatch[] | null
MergeQueueStatusBatchWithSubBatch (circular)
freezesBatchFreeze[]required

The scheduled freezes that keep the batch frozen, as of its last evaluation, one entry per reason (freezes scheduled for the same reason are listed once), up to 10 of them. Empty when the batch is not frozen, or when no freeze can be named.

namestringrequired

The name of the freeze, as the merge conditions of the batch's checks list it.

reasonstringrequired

The reason the freeze was scheduled for.

failureBatchFailure | nullrequired

The failure the queue recorded against the batch's own run, while it has not named the pull request to blame for it: set on a batch that is bisecting, and on one that waits on the batches ahead (waiting_for_previous_batches), where it is tested again without them if one of them fails, and the failure is this batch's if they pass. null otherwise, including for the last pull request of a split batch, which waits there untested.

dequeue_code"checks_failed" | "checks_interrupted" | "checks_timeout" | "branch_update_failed"required

What failed: the batch's checks failed, were interrupted or timed out, or its branch could not be updated.

Enum: checks_failed checks_interrupted checks_timeout branch_update_failed
checksstring[]required

The names of every check to blame, as the queue comment on the pull requests names them: the checks that failed, or, for a timeout, the ones still running. Those the merge conditions name come first. A fail-fast matrix blames each job it cancelled, so this can list hundreds. Empty when the failure is not one of the checks, such as branch_update_failed.

waiting_pull_requestsMergeQueueStatusPullRequest[]required
numberintegerrequired
min: 1 · max: 9223372036854776000
titlestringrequired
urlstringrequired
authorPullRequestAuthorrequired
idintegerrequired
loginstringrequired
avatar_urlstring | nullrequired

The account's avatar URL, as GitHub reports it. Null when it is not known.

queued_atstring <date-time>required
priority_aliasstringrequired
priority_rule_namestringrequired
labelsstring[]required
scopesstring[]required
queue_state_labelsstring[]required

The names of the labels the merge queue configuration has Mergify add for a pull request's queue state (merge_queue.queued_label, merge_queue.checking_label and merge_queue.dequeued_label), rendered for this pull request. The pull request does not necessarily carry all of them: they are listed so a client can tell them apart from its other labels, since this status already reports the queue state they stand for. Empty when none of these options is set.

all_scopesboolean | null

Whether the pull request impacts every scope (a merge-queue barrier: the pull requests queued behind it merge only after it, and when its checks run on a draft pull request, that draft carries every pull request queued ahead of it, whatever their scopes; in isolated merge queue mode, where no batch depends on another, it is tested on its own, and the pull requests queued behind it that are not barriers do not wait for it).false for an ordinary scoped pull request.

github_labelsPullRequestLabel[] | null
idintegerrequired
namestringrequired
colorstringrequired
defaultbooleanrequired
estimated_merge_atstring <date-time> | null

When the pull request is estimated to merge, null when it cannot be estimated. Always null for a pull request in a batch, which merges at its batch's estimated_merge_at, unless it leaves its batch (leaves_its_batch).

estimated_ci_finish_atstring <date-time> | null

When the checks the pull request merges after are estimated to end, null when they cannot be estimated. Always null for a pull request in a batch, whose checks are its batch's (estimated_ci_finish_at), unless it leaves its batch (leaves_its_batch).

conflict_with_pull_requestsinteger[] | null
conflict_resolution_advicePreviewstring | null

Set on a waiting pull request held back by a conflict that automatic conflict resolution could merge if it were turned on, or if the queue used a merge method that applies it: a one-line hint saying so and where to turn it on, as the markdown the pull request's conflict reason carries. null otherwise: on a queue whose conflict_resolvers already ran, and on a conflict no strategy is handed, such as a file deleted on one side.

conflicts_with_no_pull_request_aheadboolean | null

Set on a waiting pull request held back by a conflict, beside conflict_with_pull_requests. true when none of the pull requests ahead the merge queue deferred it behind changes a file the conflict stopped on: the conflict is then with the queue's branch, so their leaving the queue does not resolve it, and the pull request is dequeued unless it is updated with that branch. false when one of them may cause it. null when no conflict holds the pull request back.

batch_reasonBatchReason | null
kind"scope" | "directory" | "queue_order"required
Enum: scope directory queue_order
shared_scopesstring[]required
shared_directoriesstring[]required
peer_pull_request_numbersinteger[]required
affinity_scorenumberrequired
is_frozenboolean | null

Whether an ongoing scheduled freeze holds this pull request's merge, independent of its CI status — it can be running CI and is_frozen at once. false when no freeze affects it.

dequeue_requestedboolean | null

Whether a manual removal from the queue is pending for this pull request: it was removed via the 'Remove from queue' action / @mergifyio dequeue command (or is a stacked pull request that cascade removes with one), and is awaiting completion. The pull request remains listed until it is actually removed. false when no manual removal is pending; automatic dequeues (merge, CI failure, push) do not set it.

depends_on_pull_requestsinteger[] | null

Pull request numbers this one is queued behind because it depends on them: the same-repo stack predecessors the merge queue holds it behind (it declared a Depends-On: on the stack). It merges after them. null when there is no such queued dependency.

leaves_its_batchboolean | null

Whether this pull request leaves its batch to merge without it: the batch waits for a merge schedule that this pull request does not need, so the merge queue requeues this one without the pull requests that schedule holds, and it runs its checks again. Its estimated_merge_at and estimated_ci_finish_at are then its own, never its batch's, and null when they cannot be estimated, as behind a frozen batch; the batch's are those of the pull requests it keeps, null when it keeps none. false for a pull request that merges with its batch, and for one waiting.

waiting_reasonWaitingReason | nullrequired

Why the merge queue keeps this pull request out of the batches it checks. null for a pull request in one of those batches, for one none of these codes describes, and when the queue cannot tell, as while a batch ahead that failed its checks is being handled. While the queue is paused (pause in the queue's status), it is null or one of waiting_for_base, conflict_with_pull_requests_ahead, conflict_with_base_branch, waiting_for_stack_predecessor, waiting_for_schedule.

code"waiting_for_base" | "conflict_with_pull_requests_ahead" | "conflict_with_base_branch" | "waiting_for_checks_slot" | "waiting_for_scope_capacity" | "waiting_for_bisection" | "waiting_for_held_stack_predecessor" | "waiting_for_stack_predecessor" | "waiting_for_schedule" | "waiting_for_batch"required
Enum: waiting_for_base conflict_with_pull_requests_ahead conflict_with_base_branch waiting_for_checks_slot waiting_for_scope_capacity waiting_for_bisection waiting_for_held_stack_predecessor waiting_for_stack_predecessor waiting_for_schedule waiting_for_batch
pull_request_numbersinteger[]required

The pull requests the code names, as its description says, up to the first 100. Empty for a code that names none.

scopesstring[]required

For waiting_for_scope_capacity, the scopes of the pull request with no room left, up to the first 100. Empty for the other codes.

blocks_every_scopebooleanrequired

For waiting_for_bisection, true when no batch starts in any scope until the failed checks are resolved, as in a serial queue, and false when only the scopes the failed batches share with this pull request wait. false for the other codes.

mode"serial" | "parallel" | "isolated"required
Enum: serial parallel isolated
forming_batchesMergeQueueStatusFormingBatch[]

Batches still collecting pull requests, which hold no place in the merge order yet; their pull requests are listed in waiting_pull_requests.

queue_rule_namestringrequired

The queue rule the batch fills under.

scopesstring[]required

The scopes its pull requests impact, sorted.

all_scopesbooleanrequired

Whether one of its pull requests impacts every scope, which makes it a merge-queue barrier.

pull_request_numbersinteger[]required

Its pull requests, in the order the batch holds them. Each is listed in waiting_pull_requests too.

max_batch_slotsintegerrequired

The most pull requests its queue rule batches together.

batch_max_start_atstring <date-time>required

When it stops waiting for more pull requests: its oldest pull request's arrival plus the queue rule's batch_max_wait_time. It becomes a batch by then at the latest.

scope_queuesobject
pauseMergeQueuePauseResponse | null
pausedbooleanrequired

Whether the merge queue is currently paused

reasonstring | null

The reason of the merge queue pause

paused_atstring <date-time> | null

The date and time when the merge queue was paused

auto_queueboolean

Whether the repository queues a pull request on its own once it matches its conditions.

check_slotsMergeQueueStatusCheckSlots | null

The check slots and how many are taken. null for an empty queue, and while the queue rule at its head is missing from the configuration.

in_useintegerrequired

Slots taken: a batch running its checks holds one, and a bisecting batch holds one per sub-batch it runs or is about to start. It can exceed capacity for a moment after the ceiling is lowered.

capacityintegerrequired

How many batches may run their checks at once: merge_queue.max_parallel_checks, or 1 when strict branch protection forbids more under the queue rule at the head of the queue.

automatic_conflict_resolution_unsupportedPreviewboolean

Deprecated: it does not count a resolution Mergify pushes into a pull request, so it can be true where conflicts are resolved. Do not rely on it: the API versions released after 2026-11-20 leave it out. true when the repository names conflict_resolvers but no queue rule lands a batch Mergify builds, so no conflict is resolved in a batch of the merge queue: every rule merges each pull request on its own (merge_method merge, squash or rebase) or checks it in place. A queue rule with merge_method: merge-batch lands its batches, and so does one with fast-forward unless its checks run in place. false otherwise, whatever the queue holds.

Example Response
                        {
  "scope_queues": {
    "__default__": [
      "550e8400-e29b-41d4-a716-446655440001",
      "550e8400-e29b-41d4-a716-446655440002"
    ]
  },
  "batches": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440001",
      "parent_ids": [],
      "name": "Batch 1",
      "status": {
        "code": "running"
      },
      "started_at": "2025-11-05T14:05:00Z",
      "estimated_merge_at": "2025-11-05T14:35:00Z",
      "estimated_ci_finish_at": "2025-11-05T14:34:30Z",
      "ci_finished_at": "2025-11-05T14:34:30Z",
      "scopes": [
        "frontend",
        "backend"
      ],
      "queue_rule_name": "default",
      "checks_summary": {
        "passed": 45,
        "total": 67,
        "succeeded": 45,
        "failed": 0,
        "running": 20,
        "pending": 2
      },
      "pull_requests": [
        {
          "number": 1421,
          "title": "feat(auth): add \"Reset Password\" flow to login UI",
          "url": "https://github.com/org/repo/pull/1421",
          "author": {
            "id": 123,
            "login": "james"
          },
          "queued_at": "2025-11-05T13:30:00Z",
          "priority_alias": "high",
          "priority_rule_name": "hotfix",
          "labels": [
            "feature",
            "auth"
          ],
          "github_labels": [
            {
              "id": 1,
              "name": "feature",
              "color": "0e8a16",
              "default": false
            },
            {
              "id": 2,
              "name": "auth",
              "color": "1d76db",
              "default": false
            }
          ],
          "scopes": [
            "frontend"
          ]
        }
      ]
    },
    {
      "id": "550e8400-e29b-41d4-a716-446655440002",
      "parent_ids": [
        "550e8400-e29b-41d4-a716-446655440001"
      ],
      "name": "Batch 2",
      "status": {
        "code": "bisecting"
      },
      "started_at": "2025-11-05T13:35:00Z",
      "estimated_merge_at": "2025-11-05T15:35:00Z",
      "estimated_ci_finish_at": "2025-11-05T15:34:30Z",
      "ci_finished_at": "2025-11-05T14:34:30Z",
      "scopes": [
        "frontend"
      ],
      "queue_rule_name": "default",
      "checks_summary": {
        "passed": 15,
        "total": 28,
        "succeeded": 15,
        "failed": 3,
        "running": 8,
        "pending": 2
      },
      "sub_batches": [
        {
          "id": "550e8400-e29b-41d4-a716-446655440003",
          "parent_ids": [],
          "name": "Sub Batch 1",
          "status": {
            "code": "merged"
          },
          "started_at": "2025-11-05T13:40:00Z",
          "estimated_merge_at": "2025-11-05T13:50:00Z",
          "estimated_ci_finish_at": "2025-11-05T13:49:30Z",
          "ci_finished_at": "2025-11-05T13:49:30Z",
          "scopes": [
            "frontend"
          ],
          "queue_rule_name": "default",
          "checks_summary": {
            "passed": 15,
            "total": 15,
            "succeeded": 15,
            "failed": 0,
            "running": 0,
            "pending": 0
          },
          "pull_requests": []
        },
        {
          "id": "550e8400-e29b-41d4-a716-446655440004",
          "parent_ids": [],
          "name": "Sub Batch 2",
          "status": {
            "code": "running"
          },
          "started_at": "2025-11-05T13:50:00Z",
          "estimated_merge_at": "2025-11-05T14:00:00Z",
          "estimated_ci_finish_at": "2025-11-05T13:59:30Z",
          "ci_finished_at": "2025-11-05T14:34:30Z",
          "scopes": [
            "frontend"
          ],
          "queue_rule_name": "default",
          "checks_summary": {
            "passed": 0,
            "total": 13,
            "succeeded": 0,
            "failed": 0,
            "running": 13,
            "pending": 0
          },
          "pull_requests": []
        }
      ],
      "pull_requests": []
    }
  ],
  "forming_batches": [
    {
      "queue_rule_name": "default",
      "scopes": [
        "backend"
      ],
      "all_scopes": false,
      "pull_request_numbers": [
        1440
      ],
      "max_batch_slots": 5,
      "batch_max_start_at": "2025-11-05T14:52:00Z"
    }
  ],
  "waiting_pull_requests": [
    {
      "number": 1440,
      "title": "fix(api): retry the S3 client",
      "url": "https://github.com/org/repo/pull/1440",
      "author": {
        "id": 123,
        "login": "james"
      },
      "queued_at": "2025-11-05T14:42:00Z",
      "priority_alias": "medium",
      "priority_rule_name": "<default>",
      "labels": [],
      "github_labels": [],
      "scopes": [
        "backend"
      ],
      "waiting_reason": {
        "code": "waiting_for_batch",
        "pull_request_numbers": [],
        "scopes": [],
        "blocks_every_scope": false
      }
    }
  ],
  "auto_queue": false,
  "check_slots": {
    "in_use": 2,
    "capacity": 3
  },
  "automatic_conflict_resolution_unsupported": false
}
                      
400 API_VERSION_UNKNOWN: The Mergify-Version header names an API version this server does not serve. served_versions lists the versions it serves, each at the newest point this server serves (YYYY-MM-DD.N).

Body: APIVersionUnknownBody

403 APPLICATION_KEY_REFUSED: The application key lacks the permission the request needs, or the request names an account or repository of another organization. CI_TOKEN_REFUSED: The Mergify OIDC CI token has expired, lacks the permission the request needs, or the request does not name the repository it was issued for.

Body: CredentialRefusedBody

404 Not found
409 Conflict
422 CONFIGURATION_INVALID: The repository's Mergify configuration is invalid. extended_repository names the repository its extends points to when the error is in that repository's configuration file, and is null otherwise, including when the error only appears once the two configurations are merged. The route's other 422s carry no error_code.

Body: ConfigurationInvalidBody

Example Request
curl -X GET "https://api.mergify.com/v1/repos/:owner/:repository/merge-queue/status" \
  -H "Authorization: Bearer <token>"

Get a pull request in the merge queue #

GET /repos/{owner}/{repository}/merge-queue/pull/{pr_number}

Get details about a specific pull request in the merge queue

Application key permission: merge_queue: read.

Application Key Admin Application Key OIDC CI Token Mergify User Token
pr_number integer required

The pull request number

min: 1 · max: 9223372036854776000

repository string required

The name of the repository

min length: 1 · max length: 100 · pattern: ^[\w\-\.]+$

owner string required

The owner of the repository

min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$

200 Successful Response
numberintegerrequired

The number of the pull request

min: 1 · max: 9223372036854776000
queued_atstring <date-time>required

The timestamp when the pull request entered the queue

estimated_time_of_mergestring <date-time> | nullrequired

The estimated timestamp when this pull request will be merged

positionintegerrequired

The position of the pull request in the queue (0-indexed)

priority_rule_namestringrequired

The name of the priority rule applied to this pull request

queue_rule_namestringrequired

The name of the queue rule

checks_timeout_atstring <date-time> | nullrequired

When the checks of this pull request's batch will time out. Null when no checks timeout applies, while no checks run (before they first start, and until a new draft's start), and once they concluded: the time the batch waits does not count. Checks that read pending again, or start over on an edit to the batch branch or a new draft, get a whole timeout from then.

queue_ruleQueueRulerequired

The queue rule associated to this pull request

namestringrequired

The name of the queue rule

configobjectrequired

The configuration of the queue rule

mergeability_checkMergeQueueMergeabilityCheck | nullrequired

The current state of the mergeability check

check_type"in_place" | "draft_pr" | "branch" | "trusted"required

The type of queue check: in_place (checks run on the pull request itself), draft_pr (checks run on a Mergify draft pull request), branch (checks run on a merge queue branch, with no draft pull request), or trusted (no queue CI run is required: the merge relies on the pull request's own green CI, either because it already contains the base branch tip or because the base commits it is missing do not affect its scopes — the latter is Direct Merge, see https://docs.mergify.com/merge-queue/direct-merge).

Enum: in_place draft_pr branch trusted
queue_pull_request_numberinteger | nullrequired

The number of the pull request the queue checks run on: the draft pull request, or the pull request itself when it is checked in place or the check is trusted. Null when they run on a merge queue branch with no draft pull request: head_sha and queue_branch_name name it then.

started_atstring <date-time> | nullrequired

The timestamp when the checks started for this pull request

ci_ended_atstring <date-time> | nullrequired

The timestamp when the CI ended for this pull request

ci_state"pending" | "success" | "failed"required

The combined state of the CI checks

Enum: pending success failed
statestringrequired

The overall queue check conclusion

checksQueueCheck[]required

The list of pull request checks

namestringrequired

Check name

descriptionstringrequired

Check description

urlstring | nullrequired

Check detail url

details_urlstring | null

External integrator's direct URL (e.g. Jenkins build URL)

state"failure" | "error" | "cancelled" | "action_required" | "timed_out" | "pending" | "neutral" | "skipped" | "stale" | "success"required

Check state

Enum: failure error cancelled action_required timed_out pending neutral skipped stale success
avatar_urlstring | nullrequired

Check avatar_url

conditions_evaluationQueueConditionEvaluationJsonSerialized | nullrequired

The queue rule conditions evaluation

matchbooleanrequired
labelstringrequired
descriptionstring | nullrequired
documentation_urlstring | nullrequired
scheduleScheduleJSON | nullrequired
timezonestringrequired
daysobjectrequired
subconditionsQueueConditionEvaluationJsonSerialized[]required
matchbooleanrequired
labelstringrequired
descriptionstring | nullrequired
documentation_urlstring | nullrequired
scheduleScheduleJSON | nullrequired
timezonestringrequired
daysobjectrequired
subconditionsQueueConditionEvaluationJsonSerialized[]required
QueueConditionEvaluationJsonSerialized (circular)
evaluationsEvaluation[]required
pull_requestintegerrequired
min: 1 · max: 9223372036854776000
matchbooleanrequired
evaluation_errorstring | nullrequired
explanationstring | null
related_checksstring[]required
next_evaluation_atstring <date-time> | nullrequired
evaluationsEvaluation[]required
pull_requestintegerrequired
min: 1 · max: 9223372036854776000
matchbooleanrequired
evaluation_errorstring | nullrequired
explanationstring | null
related_checksstring[]required
next_evaluation_atstring <date-time> | nullrequired
run_idstring <uuid> | nullrequired

The id of the queue check run: the run_id of its action.queue.checks_start and action.queue.checks_end events.

head_shastring | null

The commit the queue check is about: the head of the merge queue branch the checks run on, or of the pull request itself when it is checked in place or the check is trusted. A trusted check runs no queue CI: that commit's own green CI stands in for it.

queue_branch_namestring | null

The merge queue branch the queue checks run on. Null when the pull request is checked in place, or when the check is trusted.

waiting_reasonWaitingReason | nullrequired

Why the merge queue keeps this pull request out of the batches it checks. null for a pull request in one of those batches, for one none of these codes describes, and when the queue cannot tell, as while a batch ahead that failed its checks is being handled. While the queue is paused (pause in the queue's status), it is null or one of waiting_for_base, conflict_with_pull_requests_ahead, conflict_with_base_branch, waiting_for_stack_predecessor, waiting_for_schedule.

code"waiting_for_base" | "conflict_with_pull_requests_ahead" | "conflict_with_base_branch" | "waiting_for_checks_slot" | "waiting_for_scope_capacity" | "waiting_for_bisection" | "waiting_for_held_stack_predecessor" | "waiting_for_stack_predecessor" | "waiting_for_schedule" | "waiting_for_batch"required
Enum: waiting_for_base conflict_with_pull_requests_ahead conflict_with_base_branch waiting_for_checks_slot waiting_for_scope_capacity waiting_for_bisection waiting_for_held_stack_predecessor waiting_for_stack_predecessor waiting_for_schedule waiting_for_batch
pull_request_numbersinteger[]required

The pull requests the code names, as its description says, up to the first 100. Empty for a code that names none.

scopesstring[]required

For waiting_for_scope_capacity, the scopes of the pull request with no room left, up to the first 100. Empty for the other codes.

blocks_every_scopebooleanrequired

For waiting_for_bisection, true when no batch starts in any scope until the failed checks are resolved, as in a serial queue, and false when only the scopes the failed batches share with this pull request wait. false for the other codes.

Example Response
                        {
  "number": 1,
  "queued_at": "2024-01-15T09:00:00Z",
  "estimated_time_of_merge": "2024-01-15T09:00:00Z",
  "position": 0,
  "priority_rule_name": "string",
  "queue_rule_name": "string",
  "checks_timeout_at": "2024-01-15T09:00:00Z",
  "queue_rule": {
    "name": "string",
    "config": {}
  },
  "mergeability_check": {
    "check_type": "in_place",
    "queue_pull_request_number": 1,
    "started_at": "2024-01-15T09:00:00Z",
    "ci_ended_at": "2024-01-15T09:00:00Z",
    "ci_state": "pending",
    "state": "string",
    "checks": [
      {}
    ],
    "conditions_evaluation": {
      "match": true,
      "label": "string",
      "description": "string",
      "documentation_url": "string",
      "schedule": {},
      "subconditions": null,
      "evaluations": null
    },
    "run_id": "string",
    "head_sha": "string",
    "queue_branch_name": "string"
  },
  "waiting_reason": {
    "code": "waiting_for_base",
    "pull_request_numbers": [
      1
    ],
    "scopes": [
      "string"
    ],
    "blocks_every_scope": true
  }
}
                      
400 API_VERSION_UNKNOWN: The Mergify-Version header names an API version this server does not serve. served_versions lists the versions it serves, each at the newest point this server serves (YYYY-MM-DD.N).

Body: APIVersionUnknownBody

403 APPLICATION_KEY_REFUSED: The application key lacks the permission the request needs, or the request names an account or repository of another organization. CI_TOKEN_REFUSED: The Mergify OIDC CI token has expired, lacks the permission the request needs, or the request does not name the repository it was issued for.

Body: CredentialRefusedBody

404 PULL_REQUEST_NOT_QUEUED: The pull request is not in any merge queue of the repository.

Body: APIErrorBody

409 Conflict
422 CONFIGURATION_INVALID: The repository's Mergify configuration is invalid. extended_repository names the repository its extends points to when the error is in that repository's configuration file, and is null otherwise, including when the error only appears once the two configurations are merged. The route's other 422s carry no error_code.

Body: ConfigurationInvalidBody

Example Request
curl -X GET "https://api.mergify.com/v1/repos/:owner/:repository/merge-queue/pull/:pr_number" \
  -H "Authorization: Bearer <token>"

Preview the impact of dequeuing a pull request #

GET /repos/{owner}/{repository}/merge-queue/pull/{pr_number}/dequeue-impact

Return how many batches would be interrupted, how many other pull requests would be rechecked, and how many stacked pull requests would also be dequeued if the given pull request is manually dequeued

Application key permission: merge_queue: write.

Application Key Admin Application Key OIDC CI Token Mergify User Token
pr_number integer required

The pull request number

min: 1 · max: 9223372036854776000

repository string required

The name of the repository

min length: 1 · max length: 100 · pattern: ^[\w\-\.]+$

owner string required

The owner of the repository

min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$

200 Successful Response
interrupted_batchesintegerrequired

Number of in-progress batches whose checks would be interrupted and restarted if this pull request is dequeued

rechecked_pull_requestsintegerrequired

Number of other pull requests from the interrupted batches that would be re-embarked and rechecked

cascaded_pull_requestsintegerrequired

Number of queued pull requests stacked on top of this one that would also be dequeued (excludes the dequeued pull request itself)

Example Response
                        {
  "interrupted_batches": 0,
  "rechecked_pull_requests": 0,
  "cascaded_pull_requests": 0
}
                      
400 API_VERSION_UNKNOWN: The Mergify-Version header names an API version this server does not serve. served_versions lists the versions it serves, each at the newest point this server serves (YYYY-MM-DD.N).

Body: APIVersionUnknownBody

403 REPOSITORY_WRITE_ROLE_REQUIRED: The caller has read access to this private repository, not write access. APPLICATION_KEY_REFUSED: The application key lacks the permission the request needs, or the request names an account or repository of another organization. CI_TOKEN_REFUSED: The Mergify OIDC CI token has expired, lacks the permission the request needs, or the request does not name the repository it was issued for.

Body: CredentialRefusedBody

404 PULL_REQUEST_NOT_QUEUED: The pull request is not in any merge queue of the repository.

Body: APIErrorBody

409 Conflict
422 CONFIGURATION_INVALID: The repository's Mergify configuration is invalid. extended_repository names the repository its extends points to when the error is in that repository's configuration file, and is null otherwise, including when the error only appears once the two configurations are merged. The route's other 422s carry no error_code.

Body: ConfigurationInvalidBody

Example Request
curl -X GET "https://api.mergify.com/v1/repos/:owner/:repository/merge-queue/pull/:pr_number/dequeue-impact" \
  -H "Authorization: Bearer <token>"

Queue a pull request #

POST /repos/{owner}/{repository}/merge-queue/pull/{pr_number}/queue

Add the given pull request to the merge queue, as the queue command does: it waits until it matches the queue_conditions of a queue rule, then enters the queue under the first one it matches. The request is accepted once checked; the pull request's queue status and the repository's events tell what became of it. A pull request that is queued, leaving the queue, or already has a queue request pending is refused.

Application key permission: merge_queue: write.

Application Key Admin Application Key OIDC CI Token Mergify User Token
pr_number integer required

The pull request number

min: -2147483648 · max: 2147483647

repository string required

The name of the repository

min length: 1 · max length: 100 · pattern: ^[\w\-\.]+$

owner string required

The owner of the repository

min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$

202 Successful Response
any
400 API_VERSION_UNKNOWN: The Mergify-Version header names an API version this server does not serve. served_versions lists the versions it serves, each at the newest point this server serves (YYYY-MM-DD.N).

Body: APIVersionUnknownBody

403 COMMAND_RESTRICTED: The commands_restrictions of the configuration do not let the caller run this command on the pull request. REPOSITORY_WRITE_ROLE_REQUIRED: The caller has read access to this private repository, not write access. APPLICATION_KEY_REFUSED: The application key lacks the permission the request needs, or the request names an account or repository of another organization. CI_TOKEN_REFUSED: The Mergify OIDC CI token has expired, lacks the permission the request needs, or the request does not name the repository it was issued for.

Body: CredentialRefusedBody

404 PULL_REQUEST_NOT_FOUND: The repository has no such pull request.

Body: APIErrorBody

409 PULL_REQUEST_NOT_QUEUEABLE: The pull request cannot be queued: it is closed, merged or locked, or it is a pull request the merge queue opened itself. PULL_REQUEST_ALREADY_QUEUED: The pull request is already in a merge queue of the repository. PULL_REQUEST_LEAVING_QUEUE: The pull request is being removed from the merge queue. It can be queued again once it has left, a few seconds later. PULL_REQUEST_QUEUE_REQUESTED: A queue request for the pull request is already pending: it enters the queue once it matches the queue conditions of a queue rule. MERGE_QUEUE_DISABLED: The merge queue is not enabled on the repository.

Body: APIErrorBody

422 CONFIGURATION_INVALID: The repository's Mergify configuration is invalid. extended_repository names the repository its extends points to when the error is in that repository's configuration file, and is null otherwise, including when the error only appears once the two configurations are merged. The route's other 422s carry no error_code.

Body: ConfigurationInvalidBody

Example Request
curl -X POST "https://api.mergify.com/v1/repos/:owner/:repository/merge-queue/pull/:pr_number/queue" \
  -H "Authorization: Bearer <token>"

Dequeue a pull request from the merge queue #

POST /repos/{owner}/{repository}/merge-queue/pull/{pr_number}/dequeue

Manually remove the given pull request (and its queued stack successors) from the merge queue, or cancel its queue request while it waits for the queue conditions of its queue rule

Application key permission: merge_queue: write.

Application Key Admin Application Key OIDC CI Token Mergify User Token
pr_number integer required

The pull request number

min: -2147483648 · max: 2147483647

repository string required

The name of the repository

min length: 1 · max length: 100 · pattern: ^[\w\-\.]+$

owner string required

The owner of the repository

min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$

204 Successful Response
400 API_VERSION_UNKNOWN: The Mergify-Version header names an API version this server does not serve. served_versions lists the versions it serves, each at the newest point this server serves (YYYY-MM-DD.N).

Body: APIVersionUnknownBody

403 COMMAND_RESTRICTED: The commands_restrictions of the configuration do not let the caller run this command on the pull request. REPOSITORY_WRITE_ROLE_REQUIRED: The caller has read access to this private repository, not write access. APPLICATION_KEY_REFUSED: The application key lacks the permission the request needs, or the request names an account or repository of another organization. CI_TOKEN_REFUSED: The Mergify OIDC CI token has expired, lacks the permission the request needs, or the request does not name the repository it was issued for.

Body: CredentialRefusedBody

404 PULL_REQUEST_NOT_QUEUED: The pull request is not in any merge queue of the repository.

Body: APIErrorBody

409 Conflict
422 CONFIGURATION_INVALID: The repository's Mergify configuration is invalid. extended_repository names the repository its extends points to when the error is in that repository's configuration file, and is null otherwise, including when the error only appears once the two configurations are merged. The route's other 422s carry no error_code.

Body: ConfigurationInvalidBody

Example Request
curl -X POST "https://api.mergify.com/v1/repos/:owner/:repository/merge-queue/pull/:pr_number/dequeue" \
  -H "Authorization: Bearer <token>"

Pause the merge queue #

PUT /repos/{owner}/{repository}/merge-queue/pause

Pause the merge of the requested repository

Application key permission: merge_queue_pause: write.

Application Key Admin Application Key OIDC CI Token Mergify User Token
repository string required

The name of the repository

min length: 1 · max length: 100 · pattern: ^[\w\-\.]+$

owner string required

The owner of the repository

min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$

reasonstringrequired

The reason of the merge queue pause

max length: 255
200 Successful Response
pausedbooleanrequired

Whether the merge queue is currently paused

reasonstring | null

The reason of the merge queue pause

paused_atstring <date-time> | null

The date and time when the merge queue was paused

Example Response
                        {
  "paused": true,
  "reason": "string",
  "paused_at": "2024-01-15T09:00:00Z"
}
                      
400 API_VERSION_UNKNOWN: The Mergify-Version header names an API version this server does not serve. served_versions lists the versions it serves, each at the newest point this server serves (YYYY-MM-DD.N).

Body: APIVersionUnknownBody

403 REPOSITORY_WRITE_ROLE_REQUIRED: The caller has read access to this private repository, not write access. APPLICATION_KEY_REFUSED: The application key lacks the permission the request needs, or the request names an account or repository of another organization. CI_TOKEN_REFUSED: The Mergify OIDC CI token has expired, lacks the permission the request needs, or the request does not name the repository it was issued for.

Body: CredentialRefusedBody

404 Not found
409 Conflict
422 CONFIGURATION_INVALID: The repository's Mergify configuration is invalid. extended_repository names the repository its extends points to when the error is in that repository's configuration file, and is null otherwise, including when the error only appears once the two configurations are merged. The route's other 422s carry no error_code.

Body: ConfigurationInvalidBody

Example Request
curl -X PUT "https://api.mergify.com/v1/repos/:owner/:repository/merge-queue/pause" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
  "reason": "string"
}'

Unpause merge queue #

DELETE /repos/{owner}/{repository}/merge-queue/pause

Unpause the merge queue of the requested repository

Application key permission: merge_queue_pause: write.

Application Key Admin Application Key OIDC CI Token Mergify User Token
repository string required

The name of the repository

min length: 1 · max length: 100 · pattern: ^[\w\-\.]+$

owner string required

The owner of the repository

min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$

204 Successful Response
400 API_VERSION_UNKNOWN: The Mergify-Version header names an API version this server does not serve. served_versions lists the versions it serves, each at the newest point this server serves (YYYY-MM-DD.N).

Body: APIVersionUnknownBody

403 REPOSITORY_WRITE_ROLE_REQUIRED: The caller has read access to this private repository, not write access. APPLICATION_KEY_REFUSED: The application key lacks the permission the request needs, or the request names an account or repository of another organization. CI_TOKEN_REFUSED: The Mergify OIDC CI token has expired, lacks the permission the request needs, or the request does not name the repository it was issued for.

Body: CredentialRefusedBody

404 Not found
409 Conflict
422 Unprocessable entity. The route no longer answers CONFIGURATION_INVALID: it works whatever the state of the repository's Mergify configuration. That body stays described for the clients that read it.

Body: ConfigurationInvalidBody

Example Request
curl -X DELETE "https://api.mergify.com/v1/repos/:owner/:repository/merge-queue/pause" \
  -H "Authorization: Bearer <token>"

Get merge queue pause data #

GET /repos/{owner}/{repository}/merge-queue/pause

Checks if the merge queue is paused and returns the pause data

Application key permission: merge_queue: read.

Application Key Admin Application Key OIDC CI Token Mergify User Token
repository string required

The name of the repository

min length: 1 · max length: 100 · pattern: ^[\w\-\.]+$

owner string required

The owner of the repository

min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$

200 Successful Response
pausedbooleanrequired

Whether the merge queue is currently paused

reasonstring | null

The reason of the merge queue pause

paused_atstring <date-time> | null

The date and time when the merge queue was paused

Example Response
                        {
  "paused": true,
  "reason": "string",
  "paused_at": "2024-01-15T09:00:00Z"
}
                      
400 API_VERSION_UNKNOWN: The Mergify-Version header names an API version this server does not serve. served_versions lists the versions it serves, each at the newest point this server serves (YYYY-MM-DD.N).

Body: APIVersionUnknownBody

403 APPLICATION_KEY_REFUSED: The application key lacks the permission the request needs, or the request names an account or repository of another organization. CI_TOKEN_REFUSED: The Mergify OIDC CI token has expired, lacks the permission the request needs, or the request does not name the repository it was issued for.

Body: CredentialRefusedBody

404 Not found
409 Conflict
422 Unprocessable entity. The route no longer answers CONFIGURATION_INVALID: it works whatever the state of the repository's Mergify configuration. That body stays described for the clients that read it.

Body: ConfigurationInvalidBody

Example Request
curl -X GET "https://api.mergify.com/v1/repos/:owner/:repository/merge-queue/pause" \
  -H "Authorization: Bearer <token>"

List the pull requests nobody has queued #

GET /repos/{owner}/{repository}/merge-queue/unqueued-pulls

List the open pull requests of a branch that nobody has queued and whose merge queue check reports them ready to queue or waiting for their queue conditions. A pull request the merge queue dequeued keeps the check that says why until its next push, and is not listed until then.

Application key permission: merge_queue: read.

Application Key Admin Application Key OIDC CI Token Mergify User Token
repository string required

The name of the repository

min length: 1 · max length: 100 · pattern: ^[\w\-\.]+$

owner string required

The owner of the repository

min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$

branch string required

The base branch of the pull requests

min length: 1 · max length: 255

state "ready" | "waiting_for_conditions"

Only list the pull requests in this state

cursor string

The opaque cursor of the current page. Must be extracted from RFC 5988 pagination links to get the previous/next pages

per_page integer

The number of items per page

min: 1 · max: 100

200 Successful Response
sizeintegerrequired

The number of items in this page

per_pageintegerrequired

The number of items per page

pull_requestsUnqueuedPullRequest[]required

The pull requests of this page, ordered by number, oldest first

numberintegerrequired

The number of the pull request

min: 1 · max: 9223372036854776000
titlestringrequired

The title of the pull request

urlstringrequired

The URL of the pull request

authorPullRequestAuthorrequired

The author of the pull request

idintegerrequired
loginstringrequired
avatar_urlstring | nullrequired

The account's avatar URL, as GitHub reports it. Null when it is not known.

state"ready" | "waiting_for_conditions"required

ready when the pull request matches its queue conditions, so queuing it lets it enter the merge queue at once; waiting_for_conditions when it does not match them yet.

Enum: ready waiting_for_conditions
countsUnqueuedPullRequestCountsrequired

How many pull requests of the branch are in each state, over every page and whatever the state filter

readyinteger

How many pull requests are ready to queue

waiting_for_conditionsinteger

How many pull requests are waiting for their queue conditions

auto_queuebooleanrequired

Whether the repository queues a pull request on its own once it matches its conditions. None is then listed ready: a waiting_for_conditions one is queued without anyone once it matches, or can be queued by hand before.

Example Response
                        {
  "size": 0,
  "per_page": 0,
  "pull_requests": [
    {
      "number": 1,
      "title": "string",
      "url": "string",
      "author": {},
      "state": "ready"
    }
  ],
  "counts": {
    "ready": 0,
    "waiting_for_conditions": 0
  },
  "auto_queue": true
}
                      
400 API_VERSION_UNKNOWN: The Mergify-Version header names an API version this server does not serve. served_versions lists the versions it serves, each at the newest point this server serves (YYYY-MM-DD.N).

Body: APIVersionUnknownBody

403 APPLICATION_KEY_REFUSED: The application key lacks the permission the request needs, or the request names an account or repository of another organization. CI_TOKEN_REFUSED: The Mergify OIDC CI token has expired, lacks the permission the request needs, or the request does not name the repository it was issued for.

Body: CredentialRefusedBody

404 Not found
409 Conflict
422 CONFIGURATION_INVALID: The repository's Mergify configuration is invalid. extended_repository names the repository its extends points to when the error is in that repository's configuration file, and is null otherwise, including when the error only appears once the two configurations are merged. The route's other 422s carry no error_code.

Body: ConfigurationInvalidBody

Example Request
curl -X GET "https://api.mergify.com/v1/repos/:owner/:repository/merge-queue/unqueued-pulls" \
  -H "Authorization: Bearer <token>"

List the merge queue policies of an organization #

GET /orgs/{owner}/merge-queue/policies

List the organization's own merge queue policies, which apply to the repositories and base branches their targets hold. A repository's own policies are listed under the repository. For a caller who is not an organization admin, a target's repositories hold only the names of the repositories that caller can see in Mergify, beside the glob patterns and ~ALL. A policy targeting none of those is not listed.

Application key permission: merge_queue_settings: read.

Application Key Admin Application Key Mergify User Token
owner string required

The owner of the repository

min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$

repository string

Only the policies whose target holds the repository of this name, or may: one of its glob patterns gave up on the name. For a caller who is not an organization admin, only a repository that caller can read has any.

max length: 255

200 Successful Response
policiesMergeQueuePolicy[]required

The policies, by name. Every active merge queue policy whose target holds a base branch applies to it, with no order between them. For each setting, a branch gets the default when no policy that applies sets it, their value when they agree, and the safest value when they disagree: for batch_pull_request, true, a draft pull request, which works with any CI. A policy one of whose glob patterns gives up on the repository or branch name may apply: the branch gets the safest of the values it could get.

idstring <uuid>required
namestringrequired
enforcement"active" | "disabled"required

active applies the policy; disabled keeps it listed without applying it

Enum: active disabled
repositorystring | nullrequired

The repository holding the policy; null for an organization's

targetPolicyTargetrequired
repositoriesPolicyRepositories | nullrequired

The repositories targeted; null for a repository's policy

include_patternsstring[]required

The repositories targeted. A name, or a glob pattern matching names as the *= condition operator does: * matches within one path segment, ** across /. ~ALL matches every one.

exclude_patternsstring[]

The repositories never targeted, even when included. A name, or a glob pattern matching names as the *= condition operator does: * matches within one path segment, ** across /. ~ALL matches every one.

branchesPolicyBranchesrequired
include_patternsstring[]required

The base branches targeted. A name, or a glob pattern matching names as the *= condition operator does: * matches within one path segment, ** across /. ~ALL matches every one. ~DEFAULT_BRANCH matches the repository's default branch.

exclude_patternsstring[]

The base branches never targeted, even when included. A name, or a glob pattern matching names as the *= condition operator does: * matches within one path segment, ** across /. ~ALL matches every one. ~DEFAULT_BRANCH matches the repository's default branch.

settingsPolicySettingsrequired

The merge queue settings a policy sets: a setting it leaves alone is absent, and takes no part in what a branch gets.

batch_pull_requestboolean

Whether the merge queue opens a draft pull request to check a batch. When false, Mergify pushes the batch to its queue branch and reads the CI of that branch's head commit, with no pull request: the CI of the base branch must run on a push to the branches under the queue_branch_prefix of your queue rules (mergify/merge-queue/ by default). A queue rule that uses merge_method: merge-batch in the isolated mode needs a draft pull request: unless its checks run in place, Mergify does not queue a pull request for such a rule on a base branch where this is false.

created_atstring <date-time>required
created_byActorrequired

Who created the policy

type"application" | "user"required
Enum: application user
idinteger | string <uuid>required
namestringrequired
updated_atstring <date-time> | nullrequired
updated_byActor | nullrequired

Who last changed the policy, if anyone did

type"application" | "user"required
Enum: application user
idinteger | string <uuid>required
namestringrequired
Example Response
                        {
  "policies": [
    {
      "id": "string",
      "name": "string",
      "enforcement": "active",
      "repository": "string",
      "target": {},
      "settings": {},
      "created_at": "2024-01-15T09:00:00Z",
      "created_by": {},
      "updated_at": "2024-01-15T09:00:00Z",
      "updated_by": {}
    }
  ]
}
                      
400 API_VERSION_UNKNOWN: The Mergify-Version header names an API version this server does not serve. served_versions lists the versions it serves, each at the newest point this server serves (YYYY-MM-DD.N).

Body: APIVersionUnknownBody

403 APPLICATION_KEY_REFUSED: The application key lacks the permission the request needs, or the request names an account or repository of another organization. CI_TOKEN_REFUSED: The Mergify OIDC CI token has expired, lacks the permission the request needs, or the request does not name the repository it was issued for.

Body: CredentialRefusedBody

404 Not found
409 Conflict
422 Unprocessable entity
Example Request
curl -X GET "https://api.mergify.com/v1/orgs/:owner/merge-queue/policies" \
  -H "Authorization: Bearer <token>"

Create a merge queue policy for an organization #

POST /orgs/{owner}/merge-queue/policies

Add a merge queue policy to the organization. Its repositories' merge queues apply it on their next pass. Requires the organization admin role.

Application key permission: merge_queue_settings: write.

Application Key Admin Application Key Mergify User Token
owner string required

The owner of the repository

min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$

namestringrequired

The policy's name, unique among the policies of its scope

min length: 1 · max length: 10000
enforcement"active" | "disabled"

active applies the policy; disabled keeps it listed without applying it

Enum: active disabled
targetOrganizationPolicyTargetrequired

The repositories and base branches an organization's policy applies to.

repositoriesPolicyRepositoriesrequired
include_patternsstring[]required

The repositories targeted. A name, or a glob pattern matching names as the *= condition operator does: * matches within one path segment, ** across /. ~ALL matches every one.

exclude_patternsstring[]

The repositories never targeted, even when included. A name, or a glob pattern matching names as the *= condition operator does: * matches within one path segment, ** across /. ~ALL matches every one.

branchesPolicyBranchesrequired
include_patternsstring[]required

The base branches targeted. A name, or a glob pattern matching names as the *= condition operator does: * matches within one path segment, ** across /. ~ALL matches every one. ~DEFAULT_BRANCH matches the repository's default branch.

exclude_patternsstring[]

The base branches never targeted, even when included. A name, or a glob pattern matching names as the *= condition operator does: * matches within one path segment, ** across /. ~ALL matches every one. ~DEFAULT_BRANCH matches the repository's default branch.

settingsPolicySettingsrequired

The merge queue settings a policy sets: a setting it leaves alone is absent, and takes no part in what a branch gets.

batch_pull_requestboolean

Whether the merge queue opens a draft pull request to check a batch. When false, Mergify pushes the batch to its queue branch and reads the CI of that branch's head commit, with no pull request: the CI of the base branch must run on a push to the branches under the queue_branch_prefix of your queue rules (mergify/merge-queue/ by default). A queue rule that uses merge_method: merge-batch in the isolated mode needs a draft pull request: unless its checks run in place, Mergify does not queue a pull request for such a rule on a base branch where this is false.

201 Successful Response
idstring <uuid>required
namestringrequired
enforcement"active" | "disabled"required

active applies the policy; disabled keeps it listed without applying it

Enum: active disabled
repositorystring | nullrequired

The repository holding the policy; null for an organization's

targetPolicyTargetrequired
repositoriesPolicyRepositories | nullrequired

The repositories targeted; null for a repository's policy

include_patternsstring[]required

The repositories targeted. A name, or a glob pattern matching names as the *= condition operator does: * matches within one path segment, ** across /. ~ALL matches every one.

exclude_patternsstring[]

The repositories never targeted, even when included. A name, or a glob pattern matching names as the *= condition operator does: * matches within one path segment, ** across /. ~ALL matches every one.

branchesPolicyBranchesrequired
include_patternsstring[]required

The base branches targeted. A name, or a glob pattern matching names as the *= condition operator does: * matches within one path segment, ** across /. ~ALL matches every one. ~DEFAULT_BRANCH matches the repository's default branch.

exclude_patternsstring[]

The base branches never targeted, even when included. A name, or a glob pattern matching names as the *= condition operator does: * matches within one path segment, ** across /. ~ALL matches every one. ~DEFAULT_BRANCH matches the repository's default branch.

settingsPolicySettingsrequired

The merge queue settings a policy sets: a setting it leaves alone is absent, and takes no part in what a branch gets.

batch_pull_requestboolean

Whether the merge queue opens a draft pull request to check a batch. When false, Mergify pushes the batch to its queue branch and reads the CI of that branch's head commit, with no pull request: the CI of the base branch must run on a push to the branches under the queue_branch_prefix of your queue rules (mergify/merge-queue/ by default). A queue rule that uses merge_method: merge-batch in the isolated mode needs a draft pull request: unless its checks run in place, Mergify does not queue a pull request for such a rule on a base branch where this is false.

created_atstring <date-time>required
created_byActorrequired

Who created the policy

type"application" | "user"required
Enum: application user
idinteger | string <uuid>required
namestringrequired
updated_atstring <date-time> | nullrequired
updated_byActor | nullrequired

Who last changed the policy, if anyone did

type"application" | "user"required
Enum: application user
idinteger | string <uuid>required
namestringrequired
Example Response
                        {
  "id": "string",
  "name": "string",
  "enforcement": "active",
  "repository": "string",
  "target": {
    "repositories": {
      "include_patterns": null,
      "exclude_patterns": null
    },
    "branches": {
      "include_patterns": null,
      "exclude_patterns": null
    }
  },
  "settings": {
    "batch_pull_request": true
  },
  "created_at": "2024-01-15T09:00:00Z",
  "created_by": {
    "type": "application",
    "id": 0,
    "name": "string"
  },
  "updated_at": "2024-01-15T09:00:00Z",
  "updated_by": {
    "type": "application",
    "id": 0,
    "name": "string"
  }
}
                      
400 API_VERSION_UNKNOWN: The Mergify-Version header names an API version this server does not serve. served_versions lists the versions it serves, each at the newest point this server serves (YYYY-MM-DD.N).

Body: APIVersionUnknownBody

403 APPLICATION_KEY_REFUSED: The application key lacks the permission the request needs, or the request names an account or repository of another organization. CI_TOKEN_REFUSED: The Mergify OIDC CI token has expired, lacks the permission the request needs, or the request does not name the repository it was issued for.

Body: CredentialRefusedBody

404 Not found
409 MERGE_QUEUE_POLICY_NAME_TAKEN: Another merge queue policy of the same organization or repository has this name. Pick another name, or edit that policy instead.

Body: APIErrorBody

422 MERGE_QUEUE_POLICY_LIMIT_REACHED: An organization, and a repository, hold at most 100 merge queue policies. Merge policies that set the same values, widen a pattern, or delete a policy instead. MERGE_QUEUE_POLICY_INVALID_PATTERN: A repository or branch pattern of the target is not a name, a glob pattern, ~ALL or, for branches, ~DEFAULT_BRANCH. Fix the pattern the error names.

Body: APIErrorBody

Example Request
curl -X POST "https://api.mergify.com/v1/orgs/:owner/merge-queue/policies" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "string",
  "enforcement": "active",
  "target": {
    "repositories": {
      "include_patterns": null,
      "exclude_patterns": null
    },
    "branches": {
      "include_patterns": null,
      "exclude_patterns": null
    }
  },
  "settings": {
    "batch_pull_request": true
  }
}'

Get a merge queue policy of an organization #

GET /orgs/{owner}/merge-queue/policies/{policy_id}

Get one of the organization's own merge queue policies. For a caller who is not an organization admin, a target's repositories hold only the names of the repositories that caller can see in Mergify, beside the glob patterns and ~ALL. A policy targeting none of those is not found.

Application key permission: merge_queue_settings: read.

Application Key Admin Application Key Mergify User Token
policy_id string <uuid> required

The id of the policy

owner string required

The owner of the repository

min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$

200 Successful Response
idstring <uuid>required
namestringrequired
enforcement"active" | "disabled"required

active applies the policy; disabled keeps it listed without applying it

Enum: active disabled
repositorystring | nullrequired

The repository holding the policy; null for an organization's

targetPolicyTargetrequired
repositoriesPolicyRepositories | nullrequired

The repositories targeted; null for a repository's policy

include_patternsstring[]required

The repositories targeted. A name, or a glob pattern matching names as the *= condition operator does: * matches within one path segment, ** across /. ~ALL matches every one.

exclude_patternsstring[]

The repositories never targeted, even when included. A name, or a glob pattern matching names as the *= condition operator does: * matches within one path segment, ** across /. ~ALL matches every one.

branchesPolicyBranchesrequired
include_patternsstring[]required

The base branches targeted. A name, or a glob pattern matching names as the *= condition operator does: * matches within one path segment, ** across /. ~ALL matches every one. ~DEFAULT_BRANCH matches the repository's default branch.

exclude_patternsstring[]

The base branches never targeted, even when included. A name, or a glob pattern matching names as the *= condition operator does: * matches within one path segment, ** across /. ~ALL matches every one. ~DEFAULT_BRANCH matches the repository's default branch.

settingsPolicySettingsrequired

The merge queue settings a policy sets: a setting it leaves alone is absent, and takes no part in what a branch gets.

batch_pull_requestboolean

Whether the merge queue opens a draft pull request to check a batch. When false, Mergify pushes the batch to its queue branch and reads the CI of that branch's head commit, with no pull request: the CI of the base branch must run on a push to the branches under the queue_branch_prefix of your queue rules (mergify/merge-queue/ by default). A queue rule that uses merge_method: merge-batch in the isolated mode needs a draft pull request: unless its checks run in place, Mergify does not queue a pull request for such a rule on a base branch where this is false.

created_atstring <date-time>required
created_byActorrequired

Who created the policy

type"application" | "user"required
Enum: application user
idinteger | string <uuid>required
namestringrequired
updated_atstring <date-time> | nullrequired
updated_byActor | nullrequired

Who last changed the policy, if anyone did

type"application" | "user"required
Enum: application user
idinteger | string <uuid>required
namestringrequired
Example Response
                        {
  "id": "string",
  "name": "string",
  "enforcement": "active",
  "repository": "string",
  "target": {
    "repositories": {
      "include_patterns": null,
      "exclude_patterns": null
    },
    "branches": {
      "include_patterns": null,
      "exclude_patterns": null
    }
  },
  "settings": {
    "batch_pull_request": true
  },
  "created_at": "2024-01-15T09:00:00Z",
  "created_by": {
    "type": "application",
    "id": 0,
    "name": "string"
  },
  "updated_at": "2024-01-15T09:00:00Z",
  "updated_by": {
    "type": "application",
    "id": 0,
    "name": "string"
  }
}
                      
400 API_VERSION_UNKNOWN: The Mergify-Version header names an API version this server does not serve. served_versions lists the versions it serves, each at the newest point this server serves (YYYY-MM-DD.N).

Body: APIVersionUnknownBody

403 APPLICATION_KEY_REFUSED: The application key lacks the permission the request needs, or the request names an account or repository of another organization. CI_TOKEN_REFUSED: The Mergify OIDC CI token has expired, lacks the permission the request needs, or the request does not name the repository it was issued for.

Body: CredentialRefusedBody

404 MERGE_QUEUE_POLICY_NOT_FOUND: There is no merge queue policy with this id here. List the policies to find the id of the one you meant.

Body: APIErrorBody

409 Conflict
422 Unprocessable entity
Example Request
curl -X GET "https://api.mergify.com/v1/orgs/:owner/merge-queue/policies/:policy_id" \
  -H "Authorization: Bearer <token>"

Update a merge queue policy of an organization #

PATCH /orgs/{owner}/merge-queue/policies/{policy_id}

Change an organization's merge queue policy: a field left out keeps its value. Its repositories' merge queues apply it on their next pass. Requires the organization admin role.

Application key permission: merge_queue_settings: write.

Application Key Admin Application Key Mergify User Token
policy_id string <uuid> required

The id of the policy

owner string required

The owner of the repository

min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$

namestring

The policy's name, unique among the policies of its scope

min length: 1 · max length: 10000
enforcement"active" | "disabled"

active applies the policy; disabled keeps it listed without applying it

Enum: active disabled
settingsPolicySettingsPatch

The settings a PATCH changes: one left out keeps its value, one set to null is no longer set by the policy.

batch_pull_requestboolean | null

Whether the merge queue opens a draft pull request to check a batch. When false, Mergify pushes the batch to its queue branch and reads the CI of that branch's head commit, with no pull request: the CI of the base branch must run on a push to the branches under the queue_branch_prefix of your queue rules (mergify/merge-queue/ by default). A queue rule that uses merge_method: merge-batch in the isolated mode needs a draft pull request: unless its checks run in place, Mergify does not queue a pull request for such a rule on a base branch where this is false.

targetOrganizationPolicyTargetPatch

The parts of the target to replace; one left out is kept

repositoriesPolicyRepositories
include_patternsstring[]required

The repositories targeted. A name, or a glob pattern matching names as the *= condition operator does: * matches within one path segment, ** across /. ~ALL matches every one.

exclude_patternsstring[]

The repositories never targeted, even when included. A name, or a glob pattern matching names as the *= condition operator does: * matches within one path segment, ** across /. ~ALL matches every one.

branchesPolicyBranches
include_patternsstring[]required

The base branches targeted. A name, or a glob pattern matching names as the *= condition operator does: * matches within one path segment, ** across /. ~ALL matches every one. ~DEFAULT_BRANCH matches the repository's default branch.

exclude_patternsstring[]

The base branches never targeted, even when included. A name, or a glob pattern matching names as the *= condition operator does: * matches within one path segment, ** across /. ~ALL matches every one. ~DEFAULT_BRANCH matches the repository's default branch.

200 Successful Response
idstring <uuid>required
namestringrequired
enforcement"active" | "disabled"required

active applies the policy; disabled keeps it listed without applying it

Enum: active disabled
repositorystring | nullrequired

The repository holding the policy; null for an organization's

targetPolicyTargetrequired
repositoriesPolicyRepositories | nullrequired

The repositories targeted; null for a repository's policy

include_patternsstring[]required

The repositories targeted. A name, or a glob pattern matching names as the *= condition operator does: * matches within one path segment, ** across /. ~ALL matches every one.

exclude_patternsstring[]

The repositories never targeted, even when included. A name, or a glob pattern matching names as the *= condition operator does: * matches within one path segment, ** across /. ~ALL matches every one.

branchesPolicyBranchesrequired
include_patternsstring[]required

The base branches targeted. A name, or a glob pattern matching names as the *= condition operator does: * matches within one path segment, ** across /. ~ALL matches every one. ~DEFAULT_BRANCH matches the repository's default branch.

exclude_patternsstring[]

The base branches never targeted, even when included. A name, or a glob pattern matching names as the *= condition operator does: * matches within one path segment, ** across /. ~ALL matches every one. ~DEFAULT_BRANCH matches the repository's default branch.

settingsPolicySettingsrequired

The merge queue settings a policy sets: a setting it leaves alone is absent, and takes no part in what a branch gets.

batch_pull_requestboolean

Whether the merge queue opens a draft pull request to check a batch. When false, Mergify pushes the batch to its queue branch and reads the CI of that branch's head commit, with no pull request: the CI of the base branch must run on a push to the branches under the queue_branch_prefix of your queue rules (mergify/merge-queue/ by default). A queue rule that uses merge_method: merge-batch in the isolated mode needs a draft pull request: unless its checks run in place, Mergify does not queue a pull request for such a rule on a base branch where this is false.

created_atstring <date-time>required
created_byActorrequired

Who created the policy

type"application" | "user"required
Enum: application user
idinteger | string <uuid>required
namestringrequired
updated_atstring <date-time> | nullrequired
updated_byActor | nullrequired

Who last changed the policy, if anyone did

type"application" | "user"required
Enum: application user
idinteger | string <uuid>required
namestringrequired
Example Response
                        {
  "id": "string",
  "name": "string",
  "enforcement": "active",
  "repository": "string",
  "target": {
    "repositories": {
      "include_patterns": null,
      "exclude_patterns": null
    },
    "branches": {
      "include_patterns": null,
      "exclude_patterns": null
    }
  },
  "settings": {
    "batch_pull_request": true
  },
  "created_at": "2024-01-15T09:00:00Z",
  "created_by": {
    "type": "application",
    "id": 0,
    "name": "string"
  },
  "updated_at": "2024-01-15T09:00:00Z",
  "updated_by": {
    "type": "application",
    "id": 0,
    "name": "string"
  }
}
                      
400 API_VERSION_UNKNOWN: The Mergify-Version header names an API version this server does not serve. served_versions lists the versions it serves, each at the newest point this server serves (YYYY-MM-DD.N).

Body: APIVersionUnknownBody

403 APPLICATION_KEY_REFUSED: The application key lacks the permission the request needs, or the request names an account or repository of another organization. CI_TOKEN_REFUSED: The Mergify OIDC CI token has expired, lacks the permission the request needs, or the request does not name the repository it was issued for.

Body: CredentialRefusedBody

404 MERGE_QUEUE_POLICY_NOT_FOUND: There is no merge queue policy with this id here. List the policies to find the id of the one you meant.

Body: APIErrorBody

409 MERGE_QUEUE_POLICY_NAME_TAKEN: Another merge queue policy of the same organization or repository has this name. Pick another name, or edit that policy instead.

Body: APIErrorBody

422 MERGE_QUEUE_POLICY_INVALID_PATTERN: A repository or branch pattern of the target is not a name, a glob pattern, ~ALL or, for branches, ~DEFAULT_BRANCH. Fix the pattern the error names.

Body: APIErrorBody

Example Request
curl -X PATCH "https://api.mergify.com/v1/orgs/:owner/merge-queue/policies/:policy_id" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "string",
  "enforcement": "active",
  "settings": {
    "batch_pull_request": true
  },
  "target": {
    "repositories": {
      "include_patterns": null,
      "exclude_patterns": null
    },
    "branches": {
      "include_patterns": null,
      "exclude_patterns": null
    }
  }
}'

Delete a merge queue policy of an organization #

DELETE /orgs/{owner}/merge-queue/policies/{policy_id}

Delete an organization's merge queue policy. Its repositories' merge queues apply the change on their next pass. Requires the organization admin role.

Application key permission: merge_queue_settings: write.

Application Key Admin Application Key Mergify User Token
policy_id string <uuid> required

The id of the policy

owner string required

The owner of the repository

min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$

204 No content
400 API_VERSION_UNKNOWN: The Mergify-Version header names an API version this server does not serve. served_versions lists the versions it serves, each at the newest point this server serves (YYYY-MM-DD.N).

Body: APIVersionUnknownBody

403 APPLICATION_KEY_REFUSED: The application key lacks the permission the request needs, or the request names an account or repository of another organization. CI_TOKEN_REFUSED: The Mergify OIDC CI token has expired, lacks the permission the request needs, or the request does not name the repository it was issued for.

Body: CredentialRefusedBody

404 MERGE_QUEUE_POLICY_NOT_FOUND: There is no merge queue policy with this id here. List the policies to find the id of the one you meant.

Body: APIErrorBody

409 Conflict
422 Unprocessable entity
Example Request
curl -X DELETE "https://api.mergify.com/v1/orgs/:owner/merge-queue/policies/:policy_id" \
  -H "Authorization: Bearer <token>"

Simulate a merge queue policy #

POST /orgs/{owner}/merge-queue/simulator/policies

Preview what a merge queue policy would change before it is created or saved: the base branches with a merge queue whose settings it changes, and the queue rules that need a draft pull request on the branches it turns drafts off for. Nothing is saved. Every active merge queue policy whose target holds a base branch applies to it, with no order between them. For each setting, a branch gets the default when no policy that applies sets it, their value when they agree, and the safest value when they disagree: for batch_pull_request, true, a draft pull request, which works with any CI. A policy one of whose glob patterns gives up on the repository or branch name may apply: the branch gets the safest of the values it could get.

Application key permission: merge_queue_settings: read.

Application Key Admin Application Key Mergify User Token
owner string required

The owner of the repository

min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$

policy_idstring <uuid> | null

The policy the body would replace, to preview an edit; left out for a new policy

repositorystring | null

The repository that would hold the policy; left out for an organization's policy

enforcement"active" | "disabled"

active applies the policy; disabled keeps it listed without applying it

Enum: active disabled
targetSimulatedPolicyTargetrequired
repositoriesPolicyRepositories | null

The repositories targeted; left out for a repository's policy

include_patternsstring[]required

The repositories targeted. A name, or a glob pattern matching names as the *= condition operator does: * matches within one path segment, ** across /. ~ALL matches every one.

exclude_patternsstring[]

The repositories never targeted, even when included. A name, or a glob pattern matching names as the *= condition operator does: * matches within one path segment, ** across /. ~ALL matches every one.

branchesPolicyBranchesrequired
include_patternsstring[]required

The base branches targeted. A name, or a glob pattern matching names as the *= condition operator does: * matches within one path segment, ** across /. ~ALL matches every one. ~DEFAULT_BRANCH matches the repository's default branch.

exclude_patternsstring[]

The base branches never targeted, even when included. A name, or a glob pattern matching names as the *= condition operator does: * matches within one path segment, ** across /. ~ALL matches every one. ~DEFAULT_BRANCH matches the repository's default branch.

settingsPolicySettingsrequired

The merge queue settings a policy sets: a setting it leaves alone is absent, and takes no part in what a branch gets.

batch_pull_requestboolean

Whether the merge queue opens a draft pull request to check a batch. When false, Mergify pushes the batch to its queue branch and reads the CI of that branch's head commit, with no pull request: the CI of the base branch must run on a push to the branches under the queue_branch_prefix of your queue rules (mergify/merge-queue/ by default). A queue rule that uses merge_method: merge-batch in the isolated mode needs a draft pull request: unless its checks run in place, Mergify does not queue a pull request for such a rule on a base branch where this is false.

200 Successful Response
branchesPolicySimulationBranch[]required

The base branches with a merge queue whose settings the policy changes, by repository and branch name. A branch has a merge queue once the merge queue has run on it. Only the repositories the caller can see are read.

repositorystringrequired

The name of the repository

branchstringrequired

The name of the base branch

beforePolicySettingsrequired

The merge queue settings a policy sets: a setting it leaves alone is absent, and takes no part in what a branch gets.

batch_pull_requestboolean

Whether the merge queue opens a draft pull request to check a batch. When false, Mergify pushes the batch to its queue branch and reads the CI of that branch's head commit, with no pull request: the CI of the base branch must run on a push to the branches under the queue_branch_prefix of your queue rules (mergify/merge-queue/ by default). A queue rule that uses merge_method: merge-batch in the isolated mode needs a draft pull request: unless its checks run in place, Mergify does not queue a pull request for such a rule on a base branch where this is false.

afterPolicySettingsrequired

The merge queue settings a policy sets: a setting it leaves alone is absent, and takes no part in what a branch gets.

batch_pull_requestboolean

Whether the merge queue opens a draft pull request to check a batch. When false, Mergify pushes the batch to its queue branch and reads the CI of that branch's head commit, with no pull request: the CI of the base branch must run on a push to the branches under the queue_branch_prefix of your queue rules (mergify/merge-queue/ by default). A queue rule that uses merge_method: merge-batch in the isolated mode needs a draft pull request: unless its checks run in place, Mergify does not queue a pull request for such a rule on a base branch where this is false.

branches_completebooleanrequired

false when the policy changes more base branches than the 2000 listed, the first ones by repository and branch name: narrow the target to preview the rest. Also false when the organization has more than 50,000 base branches with a merge queue, of which a simulation reads the first ones

draft_needsPolicySimulationDraftNeed[]required

The queue rules that need a draft pull request for each batch, on the base branches the policy turns batch_pull_request off for. Those queue rules keep their drafts: the merge queue refuses to queue a pull request with them until the configuration or a policy changes.

repositorystringrequired

The name of the repository

branchstringrequired

The base branch the policy turns batch_pull_request off for

queue_rulestringrequired

The queue rule of the repository's configuration needing a draft

reasonstringrequired

Why the queue rule needs one

draft_needs_completebooleanrequired

false when some repositories' configurations were not read: past the first 20 repositories, or when one could not be read. Their queue rules are checked when a pull request is queued. Also false when more than 2,000 queue rules need a draft, of which the first ones are listed

Example Response
                        {
  "branches": [
    {
      "repository": "string",
      "branch": "string",
      "before": {},
      "after": {}
    }
  ],
  "branches_complete": true,
  "draft_needs": [
    {
      "repository": "string",
      "branch": "string",
      "queue_rule": "string",
      "reason": "string"
    }
  ],
  "draft_needs_complete": true
}
                      
400 API_VERSION_UNKNOWN: The Mergify-Version header names an API version this server does not serve. served_versions lists the versions it serves, each at the newest point this server serves (YYYY-MM-DD.N).

Body: APIVersionUnknownBody

403 APPLICATION_KEY_REFUSED: The application key lacks the permission the request needs, or the request names an account or repository of another organization. CI_TOKEN_REFUSED: The Mergify OIDC CI token has expired, lacks the permission the request needs, or the request does not name the repository it was issued for.

Body: CredentialRefusedBody

404 Not found
409 Conflict
422 MERGE_QUEUE_POLICY_INVALID_PATTERN: A repository or branch pattern of the target is not a name, a glob pattern, ~ALL or, for branches, ~DEFAULT_BRANCH. Fix the pattern the error names.

Body: APIErrorBody

Example Request
curl -X POST "https://api.mergify.com/v1/orgs/:owner/merge-queue/simulator/policies" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
  "policy_id": "string",
  "repository": "string",
  "enforcement": "active",
  "target": {
    "repositories": {
      "include_patterns": null,
      "exclude_patterns": null
    },
    "branches": {
      "include_patterns": null,
      "exclude_patterns": null
    }
  },
  "settings": {
    "batch_pull_request": true
  }
}'

List the base branches with a merge queue in an organization #

GET /orgs/{owner}/merge-queue/branches

List the names of the base branches the merge queue has run on in the organization's repositories, each listed once, to pick a merge queue policy's branches from.

Application key permission: merge_queue_settings: read.

Application Key Admin Application Key Mergify User Token
owner string required

The owner of the repository

min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$

200 Successful Response
branchesOrganizationMergeQueueBranch[]required

The base branches with a merge queue, one per name, those of the most repositories first, then by name. A branch has a merge queue once the merge queue has run on it. Only the repositories the caller can see are read.

namestringrequired

The name of the base branch

branches_completebooleanrequired

false when there are more names than the 1,000 listed: the ones left out are those of the fewest repositories

Example Response
                        {
  "branches": [
    {
      "name": "string"
    }
  ],
  "branches_complete": true
}
                      
400 API_VERSION_UNKNOWN: The Mergify-Version header names an API version this server does not serve. served_versions lists the versions it serves, each at the newest point this server serves (YYYY-MM-DD.N).

Body: APIVersionUnknownBody

403 APPLICATION_KEY_REFUSED: The application key lacks the permission the request needs, or the request names an account or repository of another organization. CI_TOKEN_REFUSED: The Mergify OIDC CI token has expired, lacks the permission the request needs, or the request does not name the repository it was issued for.

Body: CredentialRefusedBody

404 Not found
409 Conflict
422 Unprocessable entity
Example Request
curl -X GET "https://api.mergify.com/v1/orgs/:owner/merge-queue/branches" \
  -H "Authorization: Bearer <token>"

Get the merge queue settings a base branch uses #

GET /orgs/{owner}/repositories/{repository}/merge-queue/branches/{branch_name}/settings

Get the merge queue settings a base branch uses, every policy that applies to it, and how each value was settled. Any branch name works, whether or not the branch exists. Every active merge queue policy whose target holds a base branch applies to it, with no order between them. For each setting, a branch gets the default when no policy that applies sets it, their value when they agree, and the safest value when they disagree: for batch_pull_request, true, a draft pull request, which works with any CI. A policy one of whose glob patterns gives up on the repository or branch name may apply: the branch gets the safest of the values it could get.

Application key permission: merge_queue_settings: read.

Application Key Admin Application Key OIDC CI Token Mergify User Token
branch_name string required

The name of the base branch

min length: 1 · max length: 255

repository string required

The name of the repository

min length: 1 · max length: 100 · pattern: ^[\w\-\.]+$

owner string required

The owner of the repository

min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$

200 Successful Response
branchstringrequired

The name of the base branch

settingsMergeQueueEffectiveValuesrequired

What the merge queue of this base branch uses. Every active merge queue policy whose target holds a base branch applies to it, with no order between them. For each setting, a branch gets the default when no policy that applies sets it, their value when they agree, and the safest value when they disagree: for batch_pull_request, true, a draft pull request, which works with any CI. A policy one of whose glob patterns gives up on the repository or branch name may apply: the branch gets the safest of the values it could get.

batch_pull_requestbooleanrequired

Whether the merge queue opens a draft pull request to check a batch. When false, Mergify pushes the batch to its queue branch and reads the CI of that branch's head commit, with no pull request: the CI of the base branch must run on a push to the branches under the queue_branch_prefix of your queue rules (mergify/merge-queue/ by default). A queue rule that uses merge_method: merge-batch in the isolated mode needs a draft pull request: unless its checks run in place, Mergify does not queue a pull request for such a rule on a base branch where this is false.

decisionsMergeQueueSettingDecisionsrequired

How each value was settled

batch_pull_requestMergeQueueSettingDecisionrequired

How batch_pull_request was settled

rule"default" | "policies_agree" | "policies_disagree" | "pattern_gave_up"required

How the value was settled: default when no policy that applies sets it, policies_agree when they all set the same value, policies_disagree when they do not and the safest value won, pattern_gave_up when a policy setting it may apply or not, a glob pattern of it having given up on the repository or branch name (pattern_gave_up in policies), and the value depends on it: the safest value the branch could get won. Fix or simplify that pattern

Enum: default policies_agree policies_disagree pattern_gave_up
policy_idsstring <uuid>[]required

The policies that set the value the branch gets; empty when it is the default's

policiesMergeQueueAppliedPolicy[]required

Every active policy that applies to the base branch, or may: one of its glob patterns gave up on the repository or branch name. For a caller who is not an organization admin, a target's repositories hold only the names of the repositories that caller can see in Mergify, beside the glob patterns and ~ALL.

idstring <uuid>required

The id of the policy

namestringrequired
repositorystring | nullrequired

The repository holding the policy; null for an organization's

level"organization" | "repository" | "branch" | nullrequired

Deprecated: always null.

targetPolicyTargetrequired
repositoriesPolicyRepositories | nullrequired

The repositories targeted; null for a repository's policy

include_patternsstring[]required

The repositories targeted. A name, or a glob pattern matching names as the *= condition operator does: * matches within one path segment, ** across /. ~ALL matches every one.

exclude_patternsstring[]

The repositories never targeted, even when included. A name, or a glob pattern matching names as the *= condition operator does: * matches within one path segment, ** across /. ~ALL matches every one.

branchesPolicyBranchesrequired
include_patternsstring[]required

The base branches targeted. A name, or a glob pattern matching names as the *= condition operator does: * matches within one path segment, ** across /. ~ALL matches every one. ~DEFAULT_BRANCH matches the repository's default branch.

exclude_patternsstring[]

The base branches never targeted, even when included. A name, or a glob pattern matching names as the *= condition operator does: * matches within one path segment, ** across /. ~ALL matches every one. ~DEFAULT_BRANCH matches the repository's default branch.

settingsPolicySettingsrequired

The merge queue settings a policy sets: a setting it leaves alone is absent, and takes no part in what a branch gets.

batch_pull_requestboolean

Whether the merge queue opens a draft pull request to check a batch. When false, Mergify pushes the batch to its queue branch and reads the CI of that branch's head commit, with no pull request: the CI of the base branch must run on a push to the branches under the queue_branch_prefix of your queue rules (mergify/merge-queue/ by default). A queue rule that uses merge_method: merge-batch in the isolated mode needs a draft pull request: unless its checks run in place, Mergify does not queue a pull request for such a rule on a base branch where this is false.

pattern_gave_upbooleanrequired

true when one of its glob patterns gave up on the repository or branch name, so it may apply or not: fix or simplify that pattern

sourcesMergeQueueResolvedBranchSettingsSourcesrequired

Deprecated: read decisions instead. Where each value comes from: default when no policy sets it, else repository when a policy of the repository decides it (decisions), organization otherwise.

batch_pull_requestMergeQueueResolvedBranchSettingSourcerequired

Where batch_pull_request comes from

level"branch" | "repository" | "organization" | "default"required

The scope the value comes from

Enum: branch repository organization default
branch_patternstring | nullrequired

Always null

Example Response
                        {
  "branch": "string",
  "settings": {
    "batch_pull_request": true
  },
  "decisions": {
    "batch_pull_request": {
      "rule": "default",
      "policy_ids": null
    }
  },
  "policies": [
    {
      "id": "string",
      "name": "string",
      "repository": "string",
      "level": "organization",
      "target": {},
      "settings": {},
      "pattern_gave_up": true
    }
  ],
  "sources": {
    "batch_pull_request": {
      "level": "branch",
      "branch_pattern": "string"
    }
  }
}
                      
400 API_VERSION_UNKNOWN: The Mergify-Version header names an API version this server does not serve. served_versions lists the versions it serves, each at the newest point this server serves (YYYY-MM-DD.N).

Body: APIVersionUnknownBody

403 APPLICATION_KEY_REFUSED: The application key lacks the permission the request needs, or the request names an account or repository of another organization. CI_TOKEN_REFUSED: The Mergify OIDC CI token has expired, lacks the permission the request needs, or the request does not name the repository it was issued for.

Body: CredentialRefusedBody

404 Not found
409 Conflict
422 Unprocessable entity
Example Request
curl -X GET "https://api.mergify.com/v1/orgs/:owner/repositories/:repository/merge-queue/branches/:branch_name/settings" \
  -H "Authorization: Bearer <token>"

List the merge queue policies of a repository #

GET /orgs/{owner}/repositories/{repository}/merge-queue/policies

List the repository's own merge queue policies. The organization's policies that target the repository are listed under the organization, with ?repository=.

Application key permission: merge_queue_settings: read.

Application Key Admin Application Key OIDC CI Token Mergify User Token
repository string required

The name of the repository

min length: 1 · max length: 100 · pattern: ^[\w\-\.]+$

owner string required

The owner of the repository

min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$

200 Successful Response
policiesMergeQueuePolicy[]required

The policies, by name. Every active merge queue policy whose target holds a base branch applies to it, with no order between them. For each setting, a branch gets the default when no policy that applies sets it, their value when they agree, and the safest value when they disagree: for batch_pull_request, true, a draft pull request, which works with any CI. A policy one of whose glob patterns gives up on the repository or branch name may apply: the branch gets the safest of the values it could get.

idstring <uuid>required
namestringrequired
enforcement"active" | "disabled"required

active applies the policy; disabled keeps it listed without applying it

Enum: active disabled
repositorystring | nullrequired

The repository holding the policy; null for an organization's

targetPolicyTargetrequired
repositoriesPolicyRepositories | nullrequired

The repositories targeted; null for a repository's policy

include_patternsstring[]required

The repositories targeted. A name, or a glob pattern matching names as the *= condition operator does: * matches within one path segment, ** across /. ~ALL matches every one.

exclude_patternsstring[]

The repositories never targeted, even when included. A name, or a glob pattern matching names as the *= condition operator does: * matches within one path segment, ** across /. ~ALL matches every one.

branchesPolicyBranchesrequired
include_patternsstring[]required

The base branches targeted. A name, or a glob pattern matching names as the *= condition operator does: * matches within one path segment, ** across /. ~ALL matches every one. ~DEFAULT_BRANCH matches the repository's default branch.

exclude_patternsstring[]

The base branches never targeted, even when included. A name, or a glob pattern matching names as the *= condition operator does: * matches within one path segment, ** across /. ~ALL matches every one. ~DEFAULT_BRANCH matches the repository's default branch.

settingsPolicySettingsrequired

The merge queue settings a policy sets: a setting it leaves alone is absent, and takes no part in what a branch gets.

batch_pull_requestboolean

Whether the merge queue opens a draft pull request to check a batch. When false, Mergify pushes the batch to its queue branch and reads the CI of that branch's head commit, with no pull request: the CI of the base branch must run on a push to the branches under the queue_branch_prefix of your queue rules (mergify/merge-queue/ by default). A queue rule that uses merge_method: merge-batch in the isolated mode needs a draft pull request: unless its checks run in place, Mergify does not queue a pull request for such a rule on a base branch where this is false.

created_atstring <date-time>required
created_byActorrequired

Who created the policy

type"application" | "user"required
Enum: application user
idinteger | string <uuid>required
namestringrequired
updated_atstring <date-time> | nullrequired
updated_byActor | nullrequired

Who last changed the policy, if anyone did

type"application" | "user"required
Enum: application user
idinteger | string <uuid>required
namestringrequired
Example Response
                        {
  "policies": [
    {
      "id": "string",
      "name": "string",
      "enforcement": "active",
      "repository": "string",
      "target": {},
      "settings": {},
      "created_at": "2024-01-15T09:00:00Z",
      "created_by": {},
      "updated_at": "2024-01-15T09:00:00Z",
      "updated_by": {}
    }
  ]
}
                      
400 API_VERSION_UNKNOWN: The Mergify-Version header names an API version this server does not serve. served_versions lists the versions it serves, each at the newest point this server serves (YYYY-MM-DD.N).

Body: APIVersionUnknownBody

403 APPLICATION_KEY_REFUSED: The application key lacks the permission the request needs, or the request names an account or repository of another organization. CI_TOKEN_REFUSED: The Mergify OIDC CI token has expired, lacks the permission the request needs, or the request does not name the repository it was issued for.

Body: CredentialRefusedBody

404 Not found
409 Conflict
422 Unprocessable entity
Example Request
curl -X GET "https://api.mergify.com/v1/orgs/:owner/repositories/:repository/merge-queue/policies" \
  -H "Authorization: Bearer <token>"

Create a merge queue policy for a repository #

POST /orgs/{owner}/repositories/{repository}/merge-queue/policies

Add a merge queue policy to the repository. The repository's merge queues apply it right away. Requires the admin role.

Application key permission: merge_queue_settings: write.

Application Key Admin Application Key OIDC CI Token Mergify User Token
repository string required

The name of the repository

min length: 1 · max length: 100 · pattern: ^[\w\-\.]+$

owner string required

The owner of the repository

min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$

namestringrequired

The policy's name, unique among the policies of its scope

min length: 1 · max length: 10000
enforcement"active" | "disabled"

active applies the policy; disabled keeps it listed without applying it

Enum: active disabled
targetRepositoryPolicyTargetrequired

The base branches of its repository a repository's policy applies to.

branchesPolicyBranchesrequired
include_patternsstring[]required

The base branches targeted. A name, or a glob pattern matching names as the *= condition operator does: * matches within one path segment, ** across /. ~ALL matches every one. ~DEFAULT_BRANCH matches the repository's default branch.

exclude_patternsstring[]

The base branches never targeted, even when included. A name, or a glob pattern matching names as the *= condition operator does: * matches within one path segment, ** across /. ~ALL matches every one. ~DEFAULT_BRANCH matches the repository's default branch.

settingsPolicySettingsrequired

The merge queue settings a policy sets: a setting it leaves alone is absent, and takes no part in what a branch gets.

batch_pull_requestboolean

Whether the merge queue opens a draft pull request to check a batch. When false, Mergify pushes the batch to its queue branch and reads the CI of that branch's head commit, with no pull request: the CI of the base branch must run on a push to the branches under the queue_branch_prefix of your queue rules (mergify/merge-queue/ by default). A queue rule that uses merge_method: merge-batch in the isolated mode needs a draft pull request: unless its checks run in place, Mergify does not queue a pull request for such a rule on a base branch where this is false.

201 Successful Response
idstring <uuid>required
namestringrequired
enforcement"active" | "disabled"required

active applies the policy; disabled keeps it listed without applying it

Enum: active disabled
repositorystring | nullrequired

The repository holding the policy; null for an organization's

targetPolicyTargetrequired
repositoriesPolicyRepositories | nullrequired

The repositories targeted; null for a repository's policy

include_patternsstring[]required

The repositories targeted. A name, or a glob pattern matching names as the *= condition operator does: * matches within one path segment, ** across /. ~ALL matches every one.

exclude_patternsstring[]

The repositories never targeted, even when included. A name, or a glob pattern matching names as the *= condition operator does: * matches within one path segment, ** across /. ~ALL matches every one.

branchesPolicyBranchesrequired
include_patternsstring[]required

The base branches targeted. A name, or a glob pattern matching names as the *= condition operator does: * matches within one path segment, ** across /. ~ALL matches every one. ~DEFAULT_BRANCH matches the repository's default branch.

exclude_patternsstring[]

The base branches never targeted, even when included. A name, or a glob pattern matching names as the *= condition operator does: * matches within one path segment, ** across /. ~ALL matches every one. ~DEFAULT_BRANCH matches the repository's default branch.

settingsPolicySettingsrequired

The merge queue settings a policy sets: a setting it leaves alone is absent, and takes no part in what a branch gets.

batch_pull_requestboolean

Whether the merge queue opens a draft pull request to check a batch. When false, Mergify pushes the batch to its queue branch and reads the CI of that branch's head commit, with no pull request: the CI of the base branch must run on a push to the branches under the queue_branch_prefix of your queue rules (mergify/merge-queue/ by default). A queue rule that uses merge_method: merge-batch in the isolated mode needs a draft pull request: unless its checks run in place, Mergify does not queue a pull request for such a rule on a base branch where this is false.

created_atstring <date-time>required
created_byActorrequired

Who created the policy

type"application" | "user"required
Enum: application user
idinteger | string <uuid>required
namestringrequired
updated_atstring <date-time> | nullrequired
updated_byActor | nullrequired

Who last changed the policy, if anyone did

type"application" | "user"required
Enum: application user
idinteger | string <uuid>required
namestringrequired
Example Response
                        {
  "id": "string",
  "name": "string",
  "enforcement": "active",
  "repository": "string",
  "target": {
    "repositories": {
      "include_patterns": null,
      "exclude_patterns": null
    },
    "branches": {
      "include_patterns": null,
      "exclude_patterns": null
    }
  },
  "settings": {
    "batch_pull_request": true
  },
  "created_at": "2024-01-15T09:00:00Z",
  "created_by": {
    "type": "application",
    "id": 0,
    "name": "string"
  },
  "updated_at": "2024-01-15T09:00:00Z",
  "updated_by": {
    "type": "application",
    "id": 0,
    "name": "string"
  }
}
                      
400 API_VERSION_UNKNOWN: The Mergify-Version header names an API version this server does not serve. served_versions lists the versions it serves, each at the newest point this server serves (YYYY-MM-DD.N).

Body: APIVersionUnknownBody

403 REPOSITORY_ADMIN_ROLE_REQUIRED: The caller does not have admin access to the repository. APPLICATION_KEY_REFUSED: The application key lacks the permission the request needs, or the request names an account or repository of another organization. CI_TOKEN_REFUSED: The Mergify OIDC CI token has expired, lacks the permission the request needs, or the request does not name the repository it was issued for.

Body: CredentialRefusedBody

404 Not found
409 MERGE_QUEUE_POLICY_NAME_TAKEN: Another merge queue policy of the same organization or repository has this name. Pick another name, or edit that policy instead.

Body: APIErrorBody

422 MERGE_QUEUE_POLICY_LIMIT_REACHED: An organization, and a repository, hold at most 100 merge queue policies. Merge policies that set the same values, widen a pattern, or delete a policy instead. MERGE_QUEUE_POLICY_INVALID_PATTERN: A repository or branch pattern of the target is not a name, a glob pattern, ~ALL or, for branches, ~DEFAULT_BRANCH. Fix the pattern the error names.

Body: APIErrorBody

Example Request
curl -X POST "https://api.mergify.com/v1/orgs/:owner/repositories/:repository/merge-queue/policies" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "string",
  "enforcement": "active",
  "target": {
    "branches": {
      "include_patterns": null,
      "exclude_patterns": null
    }
  },
  "settings": {
    "batch_pull_request": true
  }
}'

Get a merge queue policy of a repository #

GET /orgs/{owner}/repositories/{repository}/merge-queue/policies/{policy_id}

Get one of the repository's own merge queue policies.

Application key permission: merge_queue_settings: read.

Application Key Admin Application Key OIDC CI Token Mergify User Token
policy_id string <uuid> required

The id of the policy

repository string required

The name of the repository

min length: 1 · max length: 100 · pattern: ^[\w\-\.]+$

owner string required

The owner of the repository

min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$

200 Successful Response
idstring <uuid>required
namestringrequired
enforcement"active" | "disabled"required

active applies the policy; disabled keeps it listed without applying it

Enum: active disabled
repositorystring | nullrequired

The repository holding the policy; null for an organization's

targetPolicyTargetrequired
repositoriesPolicyRepositories | nullrequired

The repositories targeted; null for a repository's policy

include_patternsstring[]required

The repositories targeted. A name, or a glob pattern matching names as the *= condition operator does: * matches within one path segment, ** across /. ~ALL matches every one.

exclude_patternsstring[]

The repositories never targeted, even when included. A name, or a glob pattern matching names as the *= condition operator does: * matches within one path segment, ** across /. ~ALL matches every one.

branchesPolicyBranchesrequired
include_patternsstring[]required

The base branches targeted. A name, or a glob pattern matching names as the *= condition operator does: * matches within one path segment, ** across /. ~ALL matches every one. ~DEFAULT_BRANCH matches the repository's default branch.

exclude_patternsstring[]

The base branches never targeted, even when included. A name, or a glob pattern matching names as the *= condition operator does: * matches within one path segment, ** across /. ~ALL matches every one. ~DEFAULT_BRANCH matches the repository's default branch.

settingsPolicySettingsrequired

The merge queue settings a policy sets: a setting it leaves alone is absent, and takes no part in what a branch gets.

batch_pull_requestboolean

Whether the merge queue opens a draft pull request to check a batch. When false, Mergify pushes the batch to its queue branch and reads the CI of that branch's head commit, with no pull request: the CI of the base branch must run on a push to the branches under the queue_branch_prefix of your queue rules (mergify/merge-queue/ by default). A queue rule that uses merge_method: merge-batch in the isolated mode needs a draft pull request: unless its checks run in place, Mergify does not queue a pull request for such a rule on a base branch where this is false.

created_atstring <date-time>required
created_byActorrequired

Who created the policy

type"application" | "user"required
Enum: application user
idinteger | string <uuid>required
namestringrequired
updated_atstring <date-time> | nullrequired
updated_byActor | nullrequired

Who last changed the policy, if anyone did

type"application" | "user"required
Enum: application user
idinteger | string <uuid>required
namestringrequired
Example Response
                        {
  "id": "string",
  "name": "string",
  "enforcement": "active",
  "repository": "string",
  "target": {
    "repositories": {
      "include_patterns": null,
      "exclude_patterns": null
    },
    "branches": {
      "include_patterns": null,
      "exclude_patterns": null
    }
  },
  "settings": {
    "batch_pull_request": true
  },
  "created_at": "2024-01-15T09:00:00Z",
  "created_by": {
    "type": "application",
    "id": 0,
    "name": "string"
  },
  "updated_at": "2024-01-15T09:00:00Z",
  "updated_by": {
    "type": "application",
    "id": 0,
    "name": "string"
  }
}
                      
400 API_VERSION_UNKNOWN: The Mergify-Version header names an API version this server does not serve. served_versions lists the versions it serves, each at the newest point this server serves (YYYY-MM-DD.N).

Body: APIVersionUnknownBody

403 APPLICATION_KEY_REFUSED: The application key lacks the permission the request needs, or the request names an account or repository of another organization. CI_TOKEN_REFUSED: The Mergify OIDC CI token has expired, lacks the permission the request needs, or the request does not name the repository it was issued for.

Body: CredentialRefusedBody

404 MERGE_QUEUE_POLICY_NOT_FOUND: There is no merge queue policy with this id here. List the policies to find the id of the one you meant.

Body: APIErrorBody

409 Conflict
422 Unprocessable entity
Example Request
curl -X GET "https://api.mergify.com/v1/orgs/:owner/repositories/:repository/merge-queue/policies/:policy_id" \
  -H "Authorization: Bearer <token>"

Update a merge queue policy of a repository #

PATCH /orgs/{owner}/repositories/{repository}/merge-queue/policies/{policy_id}

Change a repository's merge queue policy: a field left out keeps its value. The repository's merge queues apply it right away. Requires the admin role.

Application key permission: merge_queue_settings: write.

Application Key Admin Application Key OIDC CI Token Mergify User Token
policy_id string <uuid> required

The id of the policy

repository string required

The name of the repository

min length: 1 · max length: 100 · pattern: ^[\w\-\.]+$

owner string required

The owner of the repository

min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$

namestring

The policy's name, unique among the policies of its scope

min length: 1 · max length: 10000
enforcement"active" | "disabled"

active applies the policy; disabled keeps it listed without applying it

Enum: active disabled
settingsPolicySettingsPatch

The settings a PATCH changes: one left out keeps its value, one set to null is no longer set by the policy.

batch_pull_requestboolean | null

Whether the merge queue opens a draft pull request to check a batch. When false, Mergify pushes the batch to its queue branch and reads the CI of that branch's head commit, with no pull request: the CI of the base branch must run on a push to the branches under the queue_branch_prefix of your queue rules (mergify/merge-queue/ by default). A queue rule that uses merge_method: merge-batch in the isolated mode needs a draft pull request: unless its checks run in place, Mergify does not queue a pull request for such a rule on a base branch where this is false.

targetRepositoryPolicyTargetPatch

The parts of the target to replace; one left out is kept

branchesPolicyBranches
include_patternsstring[]required

The base branches targeted. A name, or a glob pattern matching names as the *= condition operator does: * matches within one path segment, ** across /. ~ALL matches every one. ~DEFAULT_BRANCH matches the repository's default branch.

exclude_patternsstring[]

The base branches never targeted, even when included. A name, or a glob pattern matching names as the *= condition operator does: * matches within one path segment, ** across /. ~ALL matches every one. ~DEFAULT_BRANCH matches the repository's default branch.

200 Successful Response
idstring <uuid>required
namestringrequired
enforcement"active" | "disabled"required

active applies the policy; disabled keeps it listed without applying it

Enum: active disabled
repositorystring | nullrequired

The repository holding the policy; null for an organization's

targetPolicyTargetrequired
repositoriesPolicyRepositories | nullrequired

The repositories targeted; null for a repository's policy

include_patternsstring[]required

The repositories targeted. A name, or a glob pattern matching names as the *= condition operator does: * matches within one path segment, ** across /. ~ALL matches every one.

exclude_patternsstring[]

The repositories never targeted, even when included. A name, or a glob pattern matching names as the *= condition operator does: * matches within one path segment, ** across /. ~ALL matches every one.

branchesPolicyBranchesrequired
include_patternsstring[]required

The base branches targeted. A name, or a glob pattern matching names as the *= condition operator does: * matches within one path segment, ** across /. ~ALL matches every one. ~DEFAULT_BRANCH matches the repository's default branch.

exclude_patternsstring[]

The base branches never targeted, even when included. A name, or a glob pattern matching names as the *= condition operator does: * matches within one path segment, ** across /. ~ALL matches every one. ~DEFAULT_BRANCH matches the repository's default branch.

settingsPolicySettingsrequired

The merge queue settings a policy sets: a setting it leaves alone is absent, and takes no part in what a branch gets.

batch_pull_requestboolean

Whether the merge queue opens a draft pull request to check a batch. When false, Mergify pushes the batch to its queue branch and reads the CI of that branch's head commit, with no pull request: the CI of the base branch must run on a push to the branches under the queue_branch_prefix of your queue rules (mergify/merge-queue/ by default). A queue rule that uses merge_method: merge-batch in the isolated mode needs a draft pull request: unless its checks run in place, Mergify does not queue a pull request for such a rule on a base branch where this is false.

created_atstring <date-time>required
created_byActorrequired

Who created the policy

type"application" | "user"required
Enum: application user
idinteger | string <uuid>required
namestringrequired
updated_atstring <date-time> | nullrequired
updated_byActor | nullrequired

Who last changed the policy, if anyone did

type"application" | "user"required
Enum: application user
idinteger | string <uuid>required
namestringrequired
Example Response
                        {
  "id": "string",
  "name": "string",
  "enforcement": "active",
  "repository": "string",
  "target": {
    "repositories": {
      "include_patterns": null,
      "exclude_patterns": null
    },
    "branches": {
      "include_patterns": null,
      "exclude_patterns": null
    }
  },
  "settings": {
    "batch_pull_request": true
  },
  "created_at": "2024-01-15T09:00:00Z",
  "created_by": {
    "type": "application",
    "id": 0,
    "name": "string"
  },
  "updated_at": "2024-01-15T09:00:00Z",
  "updated_by": {
    "type": "application",
    "id": 0,
    "name": "string"
  }
}
                      
400 API_VERSION_UNKNOWN: The Mergify-Version header names an API version this server does not serve. served_versions lists the versions it serves, each at the newest point this server serves (YYYY-MM-DD.N).

Body: APIVersionUnknownBody

403 REPOSITORY_ADMIN_ROLE_REQUIRED: The caller does not have admin access to the repository. APPLICATION_KEY_REFUSED: The application key lacks the permission the request needs, or the request names an account or repository of another organization. CI_TOKEN_REFUSED: The Mergify OIDC CI token has expired, lacks the permission the request needs, or the request does not name the repository it was issued for.

Body: CredentialRefusedBody

404 MERGE_QUEUE_POLICY_NOT_FOUND: There is no merge queue policy with this id here. List the policies to find the id of the one you meant.

Body: APIErrorBody

409 MERGE_QUEUE_POLICY_NAME_TAKEN: Another merge queue policy of the same organization or repository has this name. Pick another name, or edit that policy instead.

Body: APIErrorBody

422 MERGE_QUEUE_POLICY_INVALID_PATTERN: A repository or branch pattern of the target is not a name, a glob pattern, ~ALL or, for branches, ~DEFAULT_BRANCH. Fix the pattern the error names.

Body: APIErrorBody

Example Request
curl -X PATCH "https://api.mergify.com/v1/orgs/:owner/repositories/:repository/merge-queue/policies/:policy_id" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "string",
  "enforcement": "active",
  "settings": {
    "batch_pull_request": true
  },
  "target": {
    "branches": {
      "include_patterns": null,
      "exclude_patterns": null
    }
  }
}'

Delete a merge queue policy of a repository #

DELETE /orgs/{owner}/repositories/{repository}/merge-queue/policies/{policy_id}

Delete a repository's merge queue policy. The repository's merge queues apply the change right away. Requires the admin role.

Application key permission: merge_queue_settings: write.

Application Key Admin Application Key OIDC CI Token Mergify User Token
policy_id string <uuid> required

The id of the policy

repository string required

The name of the repository

min length: 1 · max length: 100 · pattern: ^[\w\-\.]+$

owner string required

The owner of the repository

min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$

204 No content
400 API_VERSION_UNKNOWN: The Mergify-Version header names an API version this server does not serve. served_versions lists the versions it serves, each at the newest point this server serves (YYYY-MM-DD.N).

Body: APIVersionUnknownBody

403 REPOSITORY_ADMIN_ROLE_REQUIRED: The caller does not have admin access to the repository. APPLICATION_KEY_REFUSED: The application key lacks the permission the request needs, or the request names an account or repository of another organization. CI_TOKEN_REFUSED: The Mergify OIDC CI token has expired, lacks the permission the request needs, or the request does not name the repository it was issued for.

Body: CredentialRefusedBody

404 MERGE_QUEUE_POLICY_NOT_FOUND: There is no merge queue policy with this id here. List the policies to find the id of the one you meant.

Body: APIErrorBody

409 Conflict
422 Unprocessable entity
Example Request
curl -X DELETE "https://api.mergify.com/v1/orgs/:owner/repositories/:repository/merge-queue/policies/:policy_id" \
  -H "Authorization: Bearer <token>"

Error response bodies #

An endpoint lists each error status it returns and links to the body that comes with it.

APIVersionUnknownBody

detailstringrequired
error_code"ACTIVITY_LOG_METADATA_FILTER_NOT_INDEXED" | "API_VERSION_NOT_NEWER" | "API_VERSION_ROLLBACK_UNAVAILABLE" | "API_VERSION_UNKNOWN" | "APPLICATION_KEY_EXPIRED" | "APPLICATION_KEY_REFUSED" | "AUTO_QUARANTINE_CONFIG_NOT_FOUND" | "CI_ADMIN_ROLE_REQUIRED" | "CI_ID_TOKEN_AUDIENCE_REFUSED" | "CI_ID_TOKEN_EXCHANGE_NOT_FOUND" | "CI_ID_TOKEN_EXPIRED" | "CI_ID_TOKEN_INVALID" | "CI_ID_TOKEN_ISSUER_REFUSED" | "CI_ID_TOKEN_ISSUER_UNAVAILABLE" | "CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY" | "CI_ID_TOKEN_NO_TRUST_POLICY" | "CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED" | "CI_TOKEN_REFUSED" | "CI_TOKEN_SCOPES_TARGET_REFUSED" | "CI_TRACES_UPLOAD_UNUSABLE" | "CI_TRUST_POLICY_GRANT_REFUSED" | "CI_TRUST_POLICY_LIMIT_REACHED" | "CI_TRUST_POLICY_NAME_TAKEN" | "CI_TRUST_POLICY_NOT_FOUND" | "CI_TRUST_POLICY_REPOSITORY_UNKNOWN" | "COMMAND_RESTRICTED" | "CONFIGURATION_BRANCH_REFUSED" | "CONFIGURATION_GITHUB_APP_ACCESS_REQUIRED" | "CONFIGURATION_INVALID" | "CONFIGURATION_REFUSED_BY_REPOSITORY_RULES" | "CONFIGURATION_SIGNED_COMMITS_REQUIRED" | "DEFAULT_BRANCH_NOT_FOUND" | "FLAKY_DETECTION_NOT_CONFIGURED" | "GITHUB_ACCOUNT_SUSPENDED" | "GITHUB_APP_ACCESS_LOST" | "GITHUB_RATE_LIMITED" | "GITHUB_TOKEN_NOT_ACCEPTED" | "GITHUB_TWO_FACTOR_AUTHENTICATION_NONCOMPLIANT" | "GITHUB_UPSTREAM_REQUEST_FORBIDDEN" | "GITHUB_UPSTREAM_REQUEST_REJECTED" | "GITHUB_UPSTREAM_UNAVAILABLE" | "INTEGRATION_NOT_CONFIGURED" | "INVALID_CURSOR" | "IP_ALLOW_LIST_NOT_CONFIGURED" | "KNOWN_TESTS_BEING_COMPUTED" | "KNOWN_TESTS_NOT_SERVED" | "MERGE_QUEUE_DISABLED" | "MERGE_QUEUE_POLICY_INVALID_PATTERN" | "MERGE_QUEUE_POLICY_LIMIT_REACHED" | "MERGE_QUEUE_POLICY_NAME_TAKEN" | "MERGE_QUEUE_POLICY_NOT_FOUND" | "MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN" | "MERGE_QUEUE_SETTING_NOT_AVAILABLE" | "MERGE_QUEUE_SETTING_TOO_MANY_BRANCH_PATTERNS" | "NOT_GENERALLY_AVAILABLE" | "NO_LOGIN_IN_PROGRESS" | "ORGANIZATION_MEMBERS_ONLY" | "PULL_REQUEST_ALREADY_QUEUED" | "PULL_REQUEST_LEAVING_QUEUE" | "PULL_REQUEST_NOT_FOUND" | "PULL_REQUEST_NOT_QUEUEABLE" | "PULL_REQUEST_NOT_QUEUED" | "PULL_REQUEST_QUEUE_REQUESTED" | "PULL_REQUEST_UNREADABLE" | "REPOSITORY_ADMIN_ROLE_REQUIRED" | "REPOSITORY_READ_ROLE_REQUIRED" | "REPOSITORY_WRITE_ROLE_REQUIRED" | "RETRY_RULE_NOT_FOUND" | "ROLE_ALREADY_GRANTED" | "ROLE_CHANGE_REFUSED" | "ROLE_GRANTEE_REFUSED" | "ROLE_GRANT_NOT_FOUND" | "SAML_ENFORCEMENT_NOT_AUTHORIZED" | "SCHEDULED_FREEZE_NOT_FOUND" | "SCOPES_COVERAGE_GLOB_TOO_COSTLY" | "SCOPES_COVERAGE_MANUAL_SOURCE" | "SCOPES_COVERAGE_PATH_NOT_FOUND" | "SCOPES_COVERAGE_UNAVAILABLE" | "SETTING_MANAGED_BY_ENV" | "SETUP_ALREADY_DONE" | "SETUP_TOKEN_MISMATCH" | "STAFF_SESSION_REFUSED" | "STATISTICS_SCOPE_PERIOD_TOO_LARGE" | "SUBSCRIPTION_API_UNAVAILABLE" | "SUBSCRIPTION_FEATURE_REQUIRED" | "SUBSCRIPTION_INACTIVE" | "SUBSCRIPTION_TOKEN_INVALID" | "TEST_ALREADY_QUARANTINED" | "TEST_BRANCH_NOT_TRACKED" | "TEST_FAILURE_NOT_FOUND" | "TEST_NOT_FOUND" | "TEST_RESULTS_INGESTION_NOT_ENABLED" | "TEST_RETRY_NOT_CONFIGURED" | "TEST_STATE_NOT_FOUND" | "TEST_STATE_OVERLAP"
Enum: ACTIVITY_LOG_METADATA_FILTER_NOT_INDEXED API_VERSION_NOT_NEWER API_VERSION_ROLLBACK_UNAVAILABLE API_VERSION_UNKNOWN APPLICATION_KEY_EXPIRED APPLICATION_KEY_REFUSED AUTO_QUARANTINE_CONFIG_NOT_FOUND CI_ADMIN_ROLE_REQUIRED CI_ID_TOKEN_AUDIENCE_REFUSED CI_ID_TOKEN_EXCHANGE_NOT_FOUND CI_ID_TOKEN_EXPIRED CI_ID_TOKEN_INVALID CI_ID_TOKEN_ISSUER_REFUSED CI_ID_TOKEN_ISSUER_UNAVAILABLE CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY CI_ID_TOKEN_NO_TRUST_POLICY CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED CI_TOKEN_REFUSED CI_TOKEN_SCOPES_TARGET_REFUSED CI_TRACES_UPLOAD_UNUSABLE CI_TRUST_POLICY_GRANT_REFUSED CI_TRUST_POLICY_LIMIT_REACHED CI_TRUST_POLICY_NAME_TAKEN CI_TRUST_POLICY_NOT_FOUND CI_TRUST_POLICY_REPOSITORY_UNKNOWN COMMAND_RESTRICTED CONFIGURATION_BRANCH_REFUSED CONFIGURATION_GITHUB_APP_ACCESS_REQUIRED CONFIGURATION_INVALID CONFIGURATION_REFUSED_BY_REPOSITORY_RULES CONFIGURATION_SIGNED_COMMITS_REQUIRED DEFAULT_BRANCH_NOT_FOUND FLAKY_DETECTION_NOT_CONFIGURED GITHUB_ACCOUNT_SUSPENDED GITHUB_APP_ACCESS_LOST GITHUB_RATE_LIMITED GITHUB_TOKEN_NOT_ACCEPTED GITHUB_TWO_FACTOR_AUTHENTICATION_NONCOMPLIANT GITHUB_UPSTREAM_REQUEST_FORBIDDEN GITHUB_UPSTREAM_REQUEST_REJECTED GITHUB_UPSTREAM_UNAVAILABLE INTEGRATION_NOT_CONFIGURED INVALID_CURSOR IP_ALLOW_LIST_NOT_CONFIGURED KNOWN_TESTS_BEING_COMPUTED KNOWN_TESTS_NOT_SERVED MERGE_QUEUE_DISABLED MERGE_QUEUE_POLICY_INVALID_PATTERN MERGE_QUEUE_POLICY_LIMIT_REACHED MERGE_QUEUE_POLICY_NAME_TAKEN MERGE_QUEUE_POLICY_NOT_FOUND MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN MERGE_QUEUE_SETTING_NOT_AVAILABLE MERGE_QUEUE_SETTING_TOO_MANY_BRANCH_PATTERNS NOT_GENERALLY_AVAILABLE NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PULL_REQUEST_ALREADY_QUEUED PULL_REQUEST_LEAVING_QUEUE PULL_REQUEST_NOT_FOUND PULL_REQUEST_NOT_QUEUEABLE PULL_REQUEST_NOT_QUEUED PULL_REQUEST_QUEUE_REQUESTED PULL_REQUEST_UNREADABLE REPOSITORY_ADMIN_ROLE_REQUIRED REPOSITORY_READ_ROLE_REQUIRED REPOSITORY_WRITE_ROLE_REQUIRED RETRY_RULE_NOT_FOUND ROLE_ALREADY_GRANTED ROLE_CHANGE_REFUSED ROLE_GRANTEE_REFUSED ROLE_GRANT_NOT_FOUND SAML_ENFORCEMENT_NOT_AUTHORIZED SCHEDULED_FREEZE_NOT_FOUND SCOPES_COVERAGE_GLOB_TOO_COSTLY SCOPES_COVERAGE_MANUAL_SOURCE SCOPES_COVERAGE_PATH_NOT_FOUND SCOPES_COVERAGE_UNAVAILABLE SETTING_MANAGED_BY_ENV SETUP_ALREADY_DONE SETUP_TOKEN_MISMATCH STAFF_SESSION_REFUSED STATISTICS_SCOPE_PERIOD_TOO_LARGE SUBSCRIPTION_API_UNAVAILABLE SUBSCRIPTION_FEATURE_REQUIRED SUBSCRIPTION_INACTIVE SUBSCRIPTION_TOKEN_INVALID TEST_ALREADY_QUARANTINED TEST_BRANCH_NOT_TRACKED TEST_FAILURE_NOT_FOUND TEST_NOT_FOUND TEST_RESULTS_INGESTION_NOT_ENABLED TEST_RETRY_NOT_CONFIGURED TEST_STATE_NOT_FOUND TEST_STATE_OVERLAP
documentation_urlstring
served_versionsstring[]required
Example Response
                {
  "detail": "string",
  "error_code": "API_VERSION_UNKNOWN",
  "documentation_url": "string",
  "served_versions": [
    "string"
  ]
}
              

CredentialRefusedBody

detailstringrequired
error_code"ACTIVITY_LOG_METADATA_FILTER_NOT_INDEXED" | "API_VERSION_NOT_NEWER" | "API_VERSION_ROLLBACK_UNAVAILABLE" | "API_VERSION_UNKNOWN" | "APPLICATION_KEY_EXPIRED" | "APPLICATION_KEY_REFUSED" | "AUTO_QUARANTINE_CONFIG_NOT_FOUND" | "CI_ADMIN_ROLE_REQUIRED" | "CI_ID_TOKEN_AUDIENCE_REFUSED" | "CI_ID_TOKEN_EXCHANGE_NOT_FOUND" | "CI_ID_TOKEN_EXPIRED" | "CI_ID_TOKEN_INVALID" | "CI_ID_TOKEN_ISSUER_REFUSED" | "CI_ID_TOKEN_ISSUER_UNAVAILABLE" | "CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY" | "CI_ID_TOKEN_NO_TRUST_POLICY" | "CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED" | "CI_TOKEN_REFUSED" | "CI_TOKEN_SCOPES_TARGET_REFUSED" | "CI_TRACES_UPLOAD_UNUSABLE" | "CI_TRUST_POLICY_GRANT_REFUSED" | "CI_TRUST_POLICY_LIMIT_REACHED" | "CI_TRUST_POLICY_NAME_TAKEN" | "CI_TRUST_POLICY_NOT_FOUND" | "CI_TRUST_POLICY_REPOSITORY_UNKNOWN" | "COMMAND_RESTRICTED" | "CONFIGURATION_BRANCH_REFUSED" | "CONFIGURATION_GITHUB_APP_ACCESS_REQUIRED" | "CONFIGURATION_INVALID" | "CONFIGURATION_REFUSED_BY_REPOSITORY_RULES" | "CONFIGURATION_SIGNED_COMMITS_REQUIRED" | "DEFAULT_BRANCH_NOT_FOUND" | "FLAKY_DETECTION_NOT_CONFIGURED" | "GITHUB_ACCOUNT_SUSPENDED" | "GITHUB_APP_ACCESS_LOST" | "GITHUB_RATE_LIMITED" | "GITHUB_TOKEN_NOT_ACCEPTED" | "GITHUB_TWO_FACTOR_AUTHENTICATION_NONCOMPLIANT" | "GITHUB_UPSTREAM_REQUEST_FORBIDDEN" | "GITHUB_UPSTREAM_REQUEST_REJECTED" | "GITHUB_UPSTREAM_UNAVAILABLE" | "INTEGRATION_NOT_CONFIGURED" | "INVALID_CURSOR" | "IP_ALLOW_LIST_NOT_CONFIGURED" | "KNOWN_TESTS_BEING_COMPUTED" | "KNOWN_TESTS_NOT_SERVED" | "MERGE_QUEUE_DISABLED" | "MERGE_QUEUE_POLICY_INVALID_PATTERN" | "MERGE_QUEUE_POLICY_LIMIT_REACHED" | "MERGE_QUEUE_POLICY_NAME_TAKEN" | "MERGE_QUEUE_POLICY_NOT_FOUND" | "MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN" | "MERGE_QUEUE_SETTING_NOT_AVAILABLE" | "MERGE_QUEUE_SETTING_TOO_MANY_BRANCH_PATTERNS" | "NOT_GENERALLY_AVAILABLE" | "NO_LOGIN_IN_PROGRESS" | "ORGANIZATION_MEMBERS_ONLY" | "PULL_REQUEST_ALREADY_QUEUED" | "PULL_REQUEST_LEAVING_QUEUE" | "PULL_REQUEST_NOT_FOUND" | "PULL_REQUEST_NOT_QUEUEABLE" | "PULL_REQUEST_NOT_QUEUED" | "PULL_REQUEST_QUEUE_REQUESTED" | "PULL_REQUEST_UNREADABLE" | "REPOSITORY_ADMIN_ROLE_REQUIRED" | "REPOSITORY_READ_ROLE_REQUIRED" | "REPOSITORY_WRITE_ROLE_REQUIRED" | "RETRY_RULE_NOT_FOUND" | "ROLE_ALREADY_GRANTED" | "ROLE_CHANGE_REFUSED" | "ROLE_GRANTEE_REFUSED" | "ROLE_GRANT_NOT_FOUND" | "SAML_ENFORCEMENT_NOT_AUTHORIZED" | "SCHEDULED_FREEZE_NOT_FOUND" | "SCOPES_COVERAGE_GLOB_TOO_COSTLY" | "SCOPES_COVERAGE_MANUAL_SOURCE" | "SCOPES_COVERAGE_PATH_NOT_FOUND" | "SCOPES_COVERAGE_UNAVAILABLE" | "SETTING_MANAGED_BY_ENV" | "SETUP_ALREADY_DONE" | "SETUP_TOKEN_MISMATCH" | "STAFF_SESSION_REFUSED" | "STATISTICS_SCOPE_PERIOD_TOO_LARGE" | "SUBSCRIPTION_API_UNAVAILABLE" | "SUBSCRIPTION_FEATURE_REQUIRED" | "SUBSCRIPTION_INACTIVE" | "SUBSCRIPTION_TOKEN_INVALID" | "TEST_ALREADY_QUARANTINED" | "TEST_BRANCH_NOT_TRACKED" | "TEST_FAILURE_NOT_FOUND" | "TEST_NOT_FOUND" | "TEST_RESULTS_INGESTION_NOT_ENABLED" | "TEST_RETRY_NOT_CONFIGURED" | "TEST_STATE_NOT_FOUND" | "TEST_STATE_OVERLAP"
Enum: ACTIVITY_LOG_METADATA_FILTER_NOT_INDEXED API_VERSION_NOT_NEWER API_VERSION_ROLLBACK_UNAVAILABLE API_VERSION_UNKNOWN APPLICATION_KEY_EXPIRED APPLICATION_KEY_REFUSED AUTO_QUARANTINE_CONFIG_NOT_FOUND CI_ADMIN_ROLE_REQUIRED CI_ID_TOKEN_AUDIENCE_REFUSED CI_ID_TOKEN_EXCHANGE_NOT_FOUND CI_ID_TOKEN_EXPIRED CI_ID_TOKEN_INVALID CI_ID_TOKEN_ISSUER_REFUSED CI_ID_TOKEN_ISSUER_UNAVAILABLE CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY CI_ID_TOKEN_NO_TRUST_POLICY CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED CI_TOKEN_REFUSED CI_TOKEN_SCOPES_TARGET_REFUSED CI_TRACES_UPLOAD_UNUSABLE CI_TRUST_POLICY_GRANT_REFUSED CI_TRUST_POLICY_LIMIT_REACHED CI_TRUST_POLICY_NAME_TAKEN CI_TRUST_POLICY_NOT_FOUND CI_TRUST_POLICY_REPOSITORY_UNKNOWN COMMAND_RESTRICTED CONFIGURATION_BRANCH_REFUSED CONFIGURATION_GITHUB_APP_ACCESS_REQUIRED CONFIGURATION_INVALID CONFIGURATION_REFUSED_BY_REPOSITORY_RULES CONFIGURATION_SIGNED_COMMITS_REQUIRED DEFAULT_BRANCH_NOT_FOUND FLAKY_DETECTION_NOT_CONFIGURED GITHUB_ACCOUNT_SUSPENDED GITHUB_APP_ACCESS_LOST GITHUB_RATE_LIMITED GITHUB_TOKEN_NOT_ACCEPTED GITHUB_TWO_FACTOR_AUTHENTICATION_NONCOMPLIANT GITHUB_UPSTREAM_REQUEST_FORBIDDEN GITHUB_UPSTREAM_REQUEST_REJECTED GITHUB_UPSTREAM_UNAVAILABLE INTEGRATION_NOT_CONFIGURED INVALID_CURSOR IP_ALLOW_LIST_NOT_CONFIGURED KNOWN_TESTS_BEING_COMPUTED KNOWN_TESTS_NOT_SERVED MERGE_QUEUE_DISABLED MERGE_QUEUE_POLICY_INVALID_PATTERN MERGE_QUEUE_POLICY_LIMIT_REACHED MERGE_QUEUE_POLICY_NAME_TAKEN MERGE_QUEUE_POLICY_NOT_FOUND MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN MERGE_QUEUE_SETTING_NOT_AVAILABLE MERGE_QUEUE_SETTING_TOO_MANY_BRANCH_PATTERNS NOT_GENERALLY_AVAILABLE NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PULL_REQUEST_ALREADY_QUEUED PULL_REQUEST_LEAVING_QUEUE PULL_REQUEST_NOT_FOUND PULL_REQUEST_NOT_QUEUEABLE PULL_REQUEST_NOT_QUEUED PULL_REQUEST_QUEUE_REQUESTED PULL_REQUEST_UNREADABLE REPOSITORY_ADMIN_ROLE_REQUIRED REPOSITORY_READ_ROLE_REQUIRED REPOSITORY_WRITE_ROLE_REQUIRED RETRY_RULE_NOT_FOUND ROLE_ALREADY_GRANTED ROLE_CHANGE_REFUSED ROLE_GRANTEE_REFUSED ROLE_GRANT_NOT_FOUND SAML_ENFORCEMENT_NOT_AUTHORIZED SCHEDULED_FREEZE_NOT_FOUND SCOPES_COVERAGE_GLOB_TOO_COSTLY SCOPES_COVERAGE_MANUAL_SOURCE SCOPES_COVERAGE_PATH_NOT_FOUND SCOPES_COVERAGE_UNAVAILABLE SETTING_MANAGED_BY_ENV SETUP_ALREADY_DONE SETUP_TOKEN_MISMATCH STAFF_SESSION_REFUSED STATISTICS_SCOPE_PERIOD_TOO_LARGE SUBSCRIPTION_API_UNAVAILABLE SUBSCRIPTION_FEATURE_REQUIRED SUBSCRIPTION_INACTIVE SUBSCRIPTION_TOKEN_INVALID TEST_ALREADY_QUARANTINED TEST_BRANCH_NOT_TRACKED TEST_FAILURE_NOT_FOUND TEST_NOT_FOUND TEST_RESULTS_INGESTION_NOT_ENABLED TEST_RETRY_NOT_CONFIGURED TEST_STATE_NOT_FOUND TEST_STATE_OVERLAP
documentation_urlstring
accepted_permissionsAcceptedPermission[] | null

The permissions the operation accepts, any one of which a credential needs to call it, as its x-mergify-permission extension lists them, whatever refused the credential. Null when the operation takes no credential of this kind.

resource"merge_queue" | "merge_queue_statistics" | "merge_queue_pause" | "scheduled_freezes" | "merge_queue_settings" | "merge_protections" | "ci_jobs" | "job_retry_rules" | "runners" | "runner_fleet_settings" | "tests" | "quarantines" | "test_retry_settings" | "flaky_detection_settings" | "test_tracked_branches" | "test_selection" | "repositories" | "configuration" | "pull_requests" | "simulators" | "activity_log" | "slack" | "datadog" | "users" | "products" | "roles" | "api_version" | "oidc_trust_policies" | "ci_reporting"required
Enum: merge_queue merge_queue_statistics merge_queue_pause scheduled_freezes merge_queue_settings merge_protections ci_jobs job_retry_rules runners runner_fleet_settings tests quarantines test_retry_settings flaky_detection_settings test_tracked_branches test_selection repositories configuration pull_requests simulators activity_log slack datadog users products roles api_version oidc_trust_policies ci_reporting
access"read" | "write"required
Enum: read write
Example Response
                {
  "detail": "string",
  "error_code": "APPLICATION_KEY_REFUSED",
  "documentation_url": "string",
  "accepted_permissions": [
    {
      "resource": "merge_queue",
      "access": "read"
    }
  ]
}
              

ConfigurationInvalidBody

detailstringrequired
error_code"ACTIVITY_LOG_METADATA_FILTER_NOT_INDEXED" | "API_VERSION_NOT_NEWER" | "API_VERSION_ROLLBACK_UNAVAILABLE" | "API_VERSION_UNKNOWN" | "APPLICATION_KEY_EXPIRED" | "APPLICATION_KEY_REFUSED" | "AUTO_QUARANTINE_CONFIG_NOT_FOUND" | "CI_ADMIN_ROLE_REQUIRED" | "CI_ID_TOKEN_AUDIENCE_REFUSED" | "CI_ID_TOKEN_EXCHANGE_NOT_FOUND" | "CI_ID_TOKEN_EXPIRED" | "CI_ID_TOKEN_INVALID" | "CI_ID_TOKEN_ISSUER_REFUSED" | "CI_ID_TOKEN_ISSUER_UNAVAILABLE" | "CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY" | "CI_ID_TOKEN_NO_TRUST_POLICY" | "CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED" | "CI_TOKEN_REFUSED" | "CI_TOKEN_SCOPES_TARGET_REFUSED" | "CI_TRACES_UPLOAD_UNUSABLE" | "CI_TRUST_POLICY_GRANT_REFUSED" | "CI_TRUST_POLICY_LIMIT_REACHED" | "CI_TRUST_POLICY_NAME_TAKEN" | "CI_TRUST_POLICY_NOT_FOUND" | "CI_TRUST_POLICY_REPOSITORY_UNKNOWN" | "COMMAND_RESTRICTED" | "CONFIGURATION_BRANCH_REFUSED" | "CONFIGURATION_GITHUB_APP_ACCESS_REQUIRED" | "CONFIGURATION_INVALID" | "CONFIGURATION_REFUSED_BY_REPOSITORY_RULES" | "CONFIGURATION_SIGNED_COMMITS_REQUIRED" | "DEFAULT_BRANCH_NOT_FOUND" | "FLAKY_DETECTION_NOT_CONFIGURED" | "GITHUB_ACCOUNT_SUSPENDED" | "GITHUB_APP_ACCESS_LOST" | "GITHUB_RATE_LIMITED" | "GITHUB_TOKEN_NOT_ACCEPTED" | "GITHUB_TWO_FACTOR_AUTHENTICATION_NONCOMPLIANT" | "GITHUB_UPSTREAM_REQUEST_FORBIDDEN" | "GITHUB_UPSTREAM_REQUEST_REJECTED" | "GITHUB_UPSTREAM_UNAVAILABLE" | "INTEGRATION_NOT_CONFIGURED" | "INVALID_CURSOR" | "IP_ALLOW_LIST_NOT_CONFIGURED" | "KNOWN_TESTS_BEING_COMPUTED" | "KNOWN_TESTS_NOT_SERVED" | "MERGE_QUEUE_DISABLED" | "MERGE_QUEUE_POLICY_INVALID_PATTERN" | "MERGE_QUEUE_POLICY_LIMIT_REACHED" | "MERGE_QUEUE_POLICY_NAME_TAKEN" | "MERGE_QUEUE_POLICY_NOT_FOUND" | "MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN" | "MERGE_QUEUE_SETTING_NOT_AVAILABLE" | "MERGE_QUEUE_SETTING_TOO_MANY_BRANCH_PATTERNS" | "NOT_GENERALLY_AVAILABLE" | "NO_LOGIN_IN_PROGRESS" | "ORGANIZATION_MEMBERS_ONLY" | "PULL_REQUEST_ALREADY_QUEUED" | "PULL_REQUEST_LEAVING_QUEUE" | "PULL_REQUEST_NOT_FOUND" | "PULL_REQUEST_NOT_QUEUEABLE" | "PULL_REQUEST_NOT_QUEUED" | "PULL_REQUEST_QUEUE_REQUESTED" | "PULL_REQUEST_UNREADABLE" | "REPOSITORY_ADMIN_ROLE_REQUIRED" | "REPOSITORY_READ_ROLE_REQUIRED" | "REPOSITORY_WRITE_ROLE_REQUIRED" | "RETRY_RULE_NOT_FOUND" | "ROLE_ALREADY_GRANTED" | "ROLE_CHANGE_REFUSED" | "ROLE_GRANTEE_REFUSED" | "ROLE_GRANT_NOT_FOUND" | "SAML_ENFORCEMENT_NOT_AUTHORIZED" | "SCHEDULED_FREEZE_NOT_FOUND" | "SCOPES_COVERAGE_GLOB_TOO_COSTLY" | "SCOPES_COVERAGE_MANUAL_SOURCE" | "SCOPES_COVERAGE_PATH_NOT_FOUND" | "SCOPES_COVERAGE_UNAVAILABLE" | "SETTING_MANAGED_BY_ENV" | "SETUP_ALREADY_DONE" | "SETUP_TOKEN_MISMATCH" | "STAFF_SESSION_REFUSED" | "STATISTICS_SCOPE_PERIOD_TOO_LARGE" | "SUBSCRIPTION_API_UNAVAILABLE" | "SUBSCRIPTION_FEATURE_REQUIRED" | "SUBSCRIPTION_INACTIVE" | "SUBSCRIPTION_TOKEN_INVALID" | "TEST_ALREADY_QUARANTINED" | "TEST_BRANCH_NOT_TRACKED" | "TEST_FAILURE_NOT_FOUND" | "TEST_NOT_FOUND" | "TEST_RESULTS_INGESTION_NOT_ENABLED" | "TEST_RETRY_NOT_CONFIGURED" | "TEST_STATE_NOT_FOUND" | "TEST_STATE_OVERLAP"
Enum: ACTIVITY_LOG_METADATA_FILTER_NOT_INDEXED API_VERSION_NOT_NEWER API_VERSION_ROLLBACK_UNAVAILABLE API_VERSION_UNKNOWN APPLICATION_KEY_EXPIRED APPLICATION_KEY_REFUSED AUTO_QUARANTINE_CONFIG_NOT_FOUND CI_ADMIN_ROLE_REQUIRED CI_ID_TOKEN_AUDIENCE_REFUSED CI_ID_TOKEN_EXCHANGE_NOT_FOUND CI_ID_TOKEN_EXPIRED CI_ID_TOKEN_INVALID CI_ID_TOKEN_ISSUER_REFUSED CI_ID_TOKEN_ISSUER_UNAVAILABLE CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY CI_ID_TOKEN_NO_TRUST_POLICY CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED CI_TOKEN_REFUSED CI_TOKEN_SCOPES_TARGET_REFUSED CI_TRACES_UPLOAD_UNUSABLE CI_TRUST_POLICY_GRANT_REFUSED CI_TRUST_POLICY_LIMIT_REACHED CI_TRUST_POLICY_NAME_TAKEN CI_TRUST_POLICY_NOT_FOUND CI_TRUST_POLICY_REPOSITORY_UNKNOWN COMMAND_RESTRICTED CONFIGURATION_BRANCH_REFUSED CONFIGURATION_GITHUB_APP_ACCESS_REQUIRED CONFIGURATION_INVALID CONFIGURATION_REFUSED_BY_REPOSITORY_RULES CONFIGURATION_SIGNED_COMMITS_REQUIRED DEFAULT_BRANCH_NOT_FOUND FLAKY_DETECTION_NOT_CONFIGURED GITHUB_ACCOUNT_SUSPENDED GITHUB_APP_ACCESS_LOST GITHUB_RATE_LIMITED GITHUB_TOKEN_NOT_ACCEPTED GITHUB_TWO_FACTOR_AUTHENTICATION_NONCOMPLIANT GITHUB_UPSTREAM_REQUEST_FORBIDDEN GITHUB_UPSTREAM_REQUEST_REJECTED GITHUB_UPSTREAM_UNAVAILABLE INTEGRATION_NOT_CONFIGURED INVALID_CURSOR IP_ALLOW_LIST_NOT_CONFIGURED KNOWN_TESTS_BEING_COMPUTED KNOWN_TESTS_NOT_SERVED MERGE_QUEUE_DISABLED MERGE_QUEUE_POLICY_INVALID_PATTERN MERGE_QUEUE_POLICY_LIMIT_REACHED MERGE_QUEUE_POLICY_NAME_TAKEN MERGE_QUEUE_POLICY_NOT_FOUND MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN MERGE_QUEUE_SETTING_NOT_AVAILABLE MERGE_QUEUE_SETTING_TOO_MANY_BRANCH_PATTERNS NOT_GENERALLY_AVAILABLE NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PULL_REQUEST_ALREADY_QUEUED PULL_REQUEST_LEAVING_QUEUE PULL_REQUEST_NOT_FOUND PULL_REQUEST_NOT_QUEUEABLE PULL_REQUEST_NOT_QUEUED PULL_REQUEST_QUEUE_REQUESTED PULL_REQUEST_UNREADABLE REPOSITORY_ADMIN_ROLE_REQUIRED REPOSITORY_READ_ROLE_REQUIRED REPOSITORY_WRITE_ROLE_REQUIRED RETRY_RULE_NOT_FOUND ROLE_ALREADY_GRANTED ROLE_CHANGE_REFUSED ROLE_GRANTEE_REFUSED ROLE_GRANT_NOT_FOUND SAML_ENFORCEMENT_NOT_AUTHORIZED SCHEDULED_FREEZE_NOT_FOUND SCOPES_COVERAGE_GLOB_TOO_COSTLY SCOPES_COVERAGE_MANUAL_SOURCE SCOPES_COVERAGE_PATH_NOT_FOUND SCOPES_COVERAGE_UNAVAILABLE SETTING_MANAGED_BY_ENV SETUP_ALREADY_DONE SETUP_TOKEN_MISMATCH STAFF_SESSION_REFUSED STATISTICS_SCOPE_PERIOD_TOO_LARGE SUBSCRIPTION_API_UNAVAILABLE SUBSCRIPTION_FEATURE_REQUIRED SUBSCRIPTION_INACTIVE SUBSCRIPTION_TOKEN_INVALID TEST_ALREADY_QUARANTINED TEST_BRANCH_NOT_TRACKED TEST_FAILURE_NOT_FOUND TEST_NOT_FOUND TEST_RESULTS_INGESTION_NOT_ENABLED TEST_RETRY_NOT_CONFIGURED TEST_STATE_NOT_FOUND TEST_STATE_OVERLAP
documentation_urlstring
extended_repositorystring | null
Example Response
                {
  "detail": "string",
  "error_code": "CONFIGURATION_INVALID",
  "documentation_url": "string",
  "extended_repository": "string"
}
              

APIErrorBody

detailstringrequired
error_code"ACTIVITY_LOG_METADATA_FILTER_NOT_INDEXED" | "API_VERSION_NOT_NEWER" | "API_VERSION_ROLLBACK_UNAVAILABLE" | "API_VERSION_UNKNOWN" | "APPLICATION_KEY_EXPIRED" | "APPLICATION_KEY_REFUSED" | "AUTO_QUARANTINE_CONFIG_NOT_FOUND" | "CI_ADMIN_ROLE_REQUIRED" | "CI_ID_TOKEN_AUDIENCE_REFUSED" | "CI_ID_TOKEN_EXCHANGE_NOT_FOUND" | "CI_ID_TOKEN_EXPIRED" | "CI_ID_TOKEN_INVALID" | "CI_ID_TOKEN_ISSUER_REFUSED" | "CI_ID_TOKEN_ISSUER_UNAVAILABLE" | "CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY" | "CI_ID_TOKEN_NO_TRUST_POLICY" | "CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED" | "CI_TOKEN_REFUSED" | "CI_TOKEN_SCOPES_TARGET_REFUSED" | "CI_TRACES_UPLOAD_UNUSABLE" | "CI_TRUST_POLICY_GRANT_REFUSED" | "CI_TRUST_POLICY_LIMIT_REACHED" | "CI_TRUST_POLICY_NAME_TAKEN" | "CI_TRUST_POLICY_NOT_FOUND" | "CI_TRUST_POLICY_REPOSITORY_UNKNOWN" | "COMMAND_RESTRICTED" | "CONFIGURATION_BRANCH_REFUSED" | "CONFIGURATION_GITHUB_APP_ACCESS_REQUIRED" | "CONFIGURATION_INVALID" | "CONFIGURATION_REFUSED_BY_REPOSITORY_RULES" | "CONFIGURATION_SIGNED_COMMITS_REQUIRED" | "DEFAULT_BRANCH_NOT_FOUND" | "FLAKY_DETECTION_NOT_CONFIGURED" | "GITHUB_ACCOUNT_SUSPENDED" | "GITHUB_APP_ACCESS_LOST" | "GITHUB_RATE_LIMITED" | "GITHUB_TOKEN_NOT_ACCEPTED" | "GITHUB_TWO_FACTOR_AUTHENTICATION_NONCOMPLIANT" | "GITHUB_UPSTREAM_REQUEST_FORBIDDEN" | "GITHUB_UPSTREAM_REQUEST_REJECTED" | "GITHUB_UPSTREAM_UNAVAILABLE" | "INTEGRATION_NOT_CONFIGURED" | "INVALID_CURSOR" | "IP_ALLOW_LIST_NOT_CONFIGURED" | "KNOWN_TESTS_BEING_COMPUTED" | "KNOWN_TESTS_NOT_SERVED" | "MERGE_QUEUE_DISABLED" | "MERGE_QUEUE_POLICY_INVALID_PATTERN" | "MERGE_QUEUE_POLICY_LIMIT_REACHED" | "MERGE_QUEUE_POLICY_NAME_TAKEN" | "MERGE_QUEUE_POLICY_NOT_FOUND" | "MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN" | "MERGE_QUEUE_SETTING_NOT_AVAILABLE" | "MERGE_QUEUE_SETTING_TOO_MANY_BRANCH_PATTERNS" | "NOT_GENERALLY_AVAILABLE" | "NO_LOGIN_IN_PROGRESS" | "ORGANIZATION_MEMBERS_ONLY" | "PULL_REQUEST_ALREADY_QUEUED" | "PULL_REQUEST_LEAVING_QUEUE" | "PULL_REQUEST_NOT_FOUND" | "PULL_REQUEST_NOT_QUEUEABLE" | "PULL_REQUEST_NOT_QUEUED" | "PULL_REQUEST_QUEUE_REQUESTED" | "PULL_REQUEST_UNREADABLE" | "REPOSITORY_ADMIN_ROLE_REQUIRED" | "REPOSITORY_READ_ROLE_REQUIRED" | "REPOSITORY_WRITE_ROLE_REQUIRED" | "RETRY_RULE_NOT_FOUND" | "ROLE_ALREADY_GRANTED" | "ROLE_CHANGE_REFUSED" | "ROLE_GRANTEE_REFUSED" | "ROLE_GRANT_NOT_FOUND" | "SAML_ENFORCEMENT_NOT_AUTHORIZED" | "SCHEDULED_FREEZE_NOT_FOUND" | "SCOPES_COVERAGE_GLOB_TOO_COSTLY" | "SCOPES_COVERAGE_MANUAL_SOURCE" | "SCOPES_COVERAGE_PATH_NOT_FOUND" | "SCOPES_COVERAGE_UNAVAILABLE" | "SETTING_MANAGED_BY_ENV" | "SETUP_ALREADY_DONE" | "SETUP_TOKEN_MISMATCH" | "STAFF_SESSION_REFUSED" | "STATISTICS_SCOPE_PERIOD_TOO_LARGE" | "SUBSCRIPTION_API_UNAVAILABLE" | "SUBSCRIPTION_FEATURE_REQUIRED" | "SUBSCRIPTION_INACTIVE" | "SUBSCRIPTION_TOKEN_INVALID" | "TEST_ALREADY_QUARANTINED" | "TEST_BRANCH_NOT_TRACKED" | "TEST_FAILURE_NOT_FOUND" | "TEST_NOT_FOUND" | "TEST_RESULTS_INGESTION_NOT_ENABLED" | "TEST_RETRY_NOT_CONFIGURED" | "TEST_STATE_NOT_FOUND" | "TEST_STATE_OVERLAP"
Enum: ACTIVITY_LOG_METADATA_FILTER_NOT_INDEXED API_VERSION_NOT_NEWER API_VERSION_ROLLBACK_UNAVAILABLE API_VERSION_UNKNOWN APPLICATION_KEY_EXPIRED APPLICATION_KEY_REFUSED AUTO_QUARANTINE_CONFIG_NOT_FOUND CI_ADMIN_ROLE_REQUIRED CI_ID_TOKEN_AUDIENCE_REFUSED CI_ID_TOKEN_EXCHANGE_NOT_FOUND CI_ID_TOKEN_EXPIRED CI_ID_TOKEN_INVALID CI_ID_TOKEN_ISSUER_REFUSED CI_ID_TOKEN_ISSUER_UNAVAILABLE CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY CI_ID_TOKEN_NO_TRUST_POLICY CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED CI_TOKEN_REFUSED CI_TOKEN_SCOPES_TARGET_REFUSED CI_TRACES_UPLOAD_UNUSABLE CI_TRUST_POLICY_GRANT_REFUSED CI_TRUST_POLICY_LIMIT_REACHED CI_TRUST_POLICY_NAME_TAKEN CI_TRUST_POLICY_NOT_FOUND CI_TRUST_POLICY_REPOSITORY_UNKNOWN COMMAND_RESTRICTED CONFIGURATION_BRANCH_REFUSED CONFIGURATION_GITHUB_APP_ACCESS_REQUIRED CONFIGURATION_INVALID CONFIGURATION_REFUSED_BY_REPOSITORY_RULES CONFIGURATION_SIGNED_COMMITS_REQUIRED DEFAULT_BRANCH_NOT_FOUND FLAKY_DETECTION_NOT_CONFIGURED GITHUB_ACCOUNT_SUSPENDED GITHUB_APP_ACCESS_LOST GITHUB_RATE_LIMITED GITHUB_TOKEN_NOT_ACCEPTED GITHUB_TWO_FACTOR_AUTHENTICATION_NONCOMPLIANT GITHUB_UPSTREAM_REQUEST_FORBIDDEN GITHUB_UPSTREAM_REQUEST_REJECTED GITHUB_UPSTREAM_UNAVAILABLE INTEGRATION_NOT_CONFIGURED INVALID_CURSOR IP_ALLOW_LIST_NOT_CONFIGURED KNOWN_TESTS_BEING_COMPUTED KNOWN_TESTS_NOT_SERVED MERGE_QUEUE_DISABLED MERGE_QUEUE_POLICY_INVALID_PATTERN MERGE_QUEUE_POLICY_LIMIT_REACHED MERGE_QUEUE_POLICY_NAME_TAKEN MERGE_QUEUE_POLICY_NOT_FOUND MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN MERGE_QUEUE_SETTING_NOT_AVAILABLE MERGE_QUEUE_SETTING_TOO_MANY_BRANCH_PATTERNS NOT_GENERALLY_AVAILABLE NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PULL_REQUEST_ALREADY_QUEUED PULL_REQUEST_LEAVING_QUEUE PULL_REQUEST_NOT_FOUND PULL_REQUEST_NOT_QUEUEABLE PULL_REQUEST_NOT_QUEUED PULL_REQUEST_QUEUE_REQUESTED PULL_REQUEST_UNREADABLE REPOSITORY_ADMIN_ROLE_REQUIRED REPOSITORY_READ_ROLE_REQUIRED REPOSITORY_WRITE_ROLE_REQUIRED RETRY_RULE_NOT_FOUND ROLE_ALREADY_GRANTED ROLE_CHANGE_REFUSED ROLE_GRANTEE_REFUSED ROLE_GRANT_NOT_FOUND SAML_ENFORCEMENT_NOT_AUTHORIZED SCHEDULED_FREEZE_NOT_FOUND SCOPES_COVERAGE_GLOB_TOO_COSTLY SCOPES_COVERAGE_MANUAL_SOURCE SCOPES_COVERAGE_PATH_NOT_FOUND SCOPES_COVERAGE_UNAVAILABLE SETTING_MANAGED_BY_ENV SETUP_ALREADY_DONE SETUP_TOKEN_MISMATCH STAFF_SESSION_REFUSED STATISTICS_SCOPE_PERIOD_TOO_LARGE SUBSCRIPTION_API_UNAVAILABLE SUBSCRIPTION_FEATURE_REQUIRED SUBSCRIPTION_INACTIVE SUBSCRIPTION_TOKEN_INVALID TEST_ALREADY_QUARANTINED TEST_BRANCH_NOT_TRACKED TEST_FAILURE_NOT_FOUND TEST_NOT_FOUND TEST_RESULTS_INGESTION_NOT_ENABLED TEST_RETRY_NOT_CONFIGURED TEST_STATE_NOT_FOUND TEST_STATE_OVERLAP
documentation_urlstring
Example Response
                {
  "detail": "string",
  "error_code": "MERGE_QUEUE_POLICY_NOT_FOUND",
  "documentation_url": "string"
}
              

Was this page helpful?