Merge Queue
Control merge queue state — pause, unpause, and inspect status.
Get branches with active merge queues #
/repos/{owner}/{repository}/merge-queue/branches
Get the list of branches that currently have active merge queues
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
List of branches with active merge queues
Example Response
{
"branches": [
"string"
]
}
403 Forbidden
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`.
CI_ADMIN_ROLE_REQUIRED CI_ID_TOKEN_AUDIENCE_REFUSED CI_ID_TOKEN_EXCHANGE_NOT_ENABLED 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_SCOPES_TARGET_REFUSED CI_TRACES_UPLOAD_UNUSABLE CI_TRUST_POLICY_NAME_TAKEN COMMAND_RESTRICTED CONFIGURATION_BRANCH_REFUSED CONFIGURATION_INVALID CONFIGURATION_REFUSED_BY_REPOSITORY_RULES CONFIGURATION_SIGNED_COMMITS_REQUIRED DEFAULT_BRANCH_NOT_FOUND GITHUB_ACCOUNT_SUSPENDED GITHUB_APP_ACCESS_LOST GITHUB_RATE_LIMITED GITHUB_UPSTREAM_REQUEST_FORBIDDEN GITHUB_UPSTREAM_REQUEST_REJECTED GITHUB_UPSTREAM_UNAVAILABLE ID_TOKEN_KEY_ROTATION_REFUSED INTEGRATION_NOT_CONFIGURED IP_ALLOW_LIST_NOT_CONFIGURED MERGE_QUEUE_DISABLED MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN MERGE_QUEUE_SETTING_NOT_AVAILABLE NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PIPELINE_NAME_TAKEN PIPELINE_NOT_FOUND PIPELINE_RUN_NOT_FOUND PIPELINE_SECRETS_KEY_ALREADY_ADDED PIPELINE_SECRETS_KEY_IN_USE PIPELINE_SECRETS_KEY_LIMIT_REACHED PIPELINE_SECRETS_KEY_NOT_ACTIVE PIPELINE_SECRETS_KEY_NOT_FOUND PIPELINE_SECRETS_KEY_REPORTED PIPELINE_SECRET_LIMIT_REACHED PIPELINE_SECRET_NAME_TAKEN PIPELINE_SECRET_NOT_FOUND PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS PIPELINE_SECRET_VERSION_CHANGED PULL_REQUEST_ALREADY_QUEUED PULL_REQUEST_NOT_FOUND PULL_REQUEST_NOT_QUEUEABLE PULL_REQUEST_NOT_QUEUED RETRY_RULE_NOT_FOUND SAML_ENFORCEMENT_NOT_AUTHORIZED SETTING_MANAGED_BY_ENV SETUP_ALREADY_DONE SETUP_TOKEN_MISMATCH SUBSCRIPTION_API_UNAVAILABLE SUBSCRIPTION_INACTIVE SUBSCRIPTION_TOKEN_INVALID TEST_ALREADY_QUARANTINED TEST_BRANCH_NOT_TRACKED TEST_RETRY_NOT_CONFIGURED TEST_STATE_OVERLAPExample Response
{
"detail": "string",
"error_code": "CI_ADMIN_ROLE_REQUIRED",
"documentation_url": "string",
"extended_repository": "string"
}
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 #
/repos/{owner}/{repository}/merge-queue/status
Get the current status of the speculative checks, batches, and queued pull requests in the merge queue
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
serial parallel isolatedWhether the repository queues a pull request on its own once it matches its conditions.
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
},
"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
},
"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
},
"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
},
"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"
]
}
],
"auto_queue": false,
"check_slots": {
"in_use": 2,
"capacity": 3
}
}
403 Forbidden
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`.
CI_ADMIN_ROLE_REQUIRED CI_ID_TOKEN_AUDIENCE_REFUSED CI_ID_TOKEN_EXCHANGE_NOT_ENABLED 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_SCOPES_TARGET_REFUSED CI_TRACES_UPLOAD_UNUSABLE CI_TRUST_POLICY_NAME_TAKEN COMMAND_RESTRICTED CONFIGURATION_BRANCH_REFUSED CONFIGURATION_INVALID CONFIGURATION_REFUSED_BY_REPOSITORY_RULES CONFIGURATION_SIGNED_COMMITS_REQUIRED DEFAULT_BRANCH_NOT_FOUND GITHUB_ACCOUNT_SUSPENDED GITHUB_APP_ACCESS_LOST GITHUB_RATE_LIMITED GITHUB_UPSTREAM_REQUEST_FORBIDDEN GITHUB_UPSTREAM_REQUEST_REJECTED GITHUB_UPSTREAM_UNAVAILABLE ID_TOKEN_KEY_ROTATION_REFUSED INTEGRATION_NOT_CONFIGURED IP_ALLOW_LIST_NOT_CONFIGURED MERGE_QUEUE_DISABLED MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN MERGE_QUEUE_SETTING_NOT_AVAILABLE NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PIPELINE_NAME_TAKEN PIPELINE_NOT_FOUND PIPELINE_RUN_NOT_FOUND PIPELINE_SECRETS_KEY_ALREADY_ADDED PIPELINE_SECRETS_KEY_IN_USE PIPELINE_SECRETS_KEY_LIMIT_REACHED PIPELINE_SECRETS_KEY_NOT_ACTIVE PIPELINE_SECRETS_KEY_NOT_FOUND PIPELINE_SECRETS_KEY_REPORTED PIPELINE_SECRET_LIMIT_REACHED PIPELINE_SECRET_NAME_TAKEN PIPELINE_SECRET_NOT_FOUND PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS PIPELINE_SECRET_VERSION_CHANGED PULL_REQUEST_ALREADY_QUEUED PULL_REQUEST_NOT_FOUND PULL_REQUEST_NOT_QUEUEABLE PULL_REQUEST_NOT_QUEUED RETRY_RULE_NOT_FOUND SAML_ENFORCEMENT_NOT_AUTHORIZED SETTING_MANAGED_BY_ENV SETUP_ALREADY_DONE SETUP_TOKEN_MISMATCH SUBSCRIPTION_API_UNAVAILABLE SUBSCRIPTION_INACTIVE SUBSCRIPTION_TOKEN_INVALID TEST_ALREADY_QUARANTINED TEST_BRANCH_NOT_TRACKED TEST_RETRY_NOT_CONFIGURED TEST_STATE_OVERLAPExample Response
{
"detail": "string",
"error_code": "CI_ADMIN_ROLE_REQUIRED",
"documentation_url": "string",
"extended_repository": "string"
}
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 #
/repos/{owner}/{repository}/merge-queue/pull/{pr_number}
Get details about a specific pull request in the merge queue
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
The number of the pull request
The timestamp when the pull request entered the queue
The estimated timestamp when this pull request will be merged
The position of the pull request in the queue (0-indexed)
The name of the priority rule applied to this pull request
The name of the queue rule
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.
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"
}
}
403 Forbidden
404 `PULL_REQUEST_NOT_QUEUED`: The pull request is not in any merge queue of the repository.
CI_ADMIN_ROLE_REQUIRED CI_ID_TOKEN_AUDIENCE_REFUSED CI_ID_TOKEN_EXCHANGE_NOT_ENABLED 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_SCOPES_TARGET_REFUSED CI_TRACES_UPLOAD_UNUSABLE CI_TRUST_POLICY_NAME_TAKEN COMMAND_RESTRICTED CONFIGURATION_BRANCH_REFUSED CONFIGURATION_INVALID CONFIGURATION_REFUSED_BY_REPOSITORY_RULES CONFIGURATION_SIGNED_COMMITS_REQUIRED DEFAULT_BRANCH_NOT_FOUND GITHUB_ACCOUNT_SUSPENDED GITHUB_APP_ACCESS_LOST GITHUB_RATE_LIMITED GITHUB_UPSTREAM_REQUEST_FORBIDDEN GITHUB_UPSTREAM_REQUEST_REJECTED GITHUB_UPSTREAM_UNAVAILABLE ID_TOKEN_KEY_ROTATION_REFUSED INTEGRATION_NOT_CONFIGURED IP_ALLOW_LIST_NOT_CONFIGURED MERGE_QUEUE_DISABLED MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN MERGE_QUEUE_SETTING_NOT_AVAILABLE NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PIPELINE_NAME_TAKEN PIPELINE_NOT_FOUND PIPELINE_RUN_NOT_FOUND PIPELINE_SECRETS_KEY_ALREADY_ADDED PIPELINE_SECRETS_KEY_IN_USE PIPELINE_SECRETS_KEY_LIMIT_REACHED PIPELINE_SECRETS_KEY_NOT_ACTIVE PIPELINE_SECRETS_KEY_NOT_FOUND PIPELINE_SECRETS_KEY_REPORTED PIPELINE_SECRET_LIMIT_REACHED PIPELINE_SECRET_NAME_TAKEN PIPELINE_SECRET_NOT_FOUND PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS PIPELINE_SECRET_VERSION_CHANGED PULL_REQUEST_ALREADY_QUEUED PULL_REQUEST_NOT_FOUND PULL_REQUEST_NOT_QUEUEABLE PULL_REQUEST_NOT_QUEUED RETRY_RULE_NOT_FOUND SAML_ENFORCEMENT_NOT_AUTHORIZED SETTING_MANAGED_BY_ENV SETUP_ALREADY_DONE SETUP_TOKEN_MISMATCH SUBSCRIPTION_API_UNAVAILABLE SUBSCRIPTION_INACTIVE SUBSCRIPTION_TOKEN_INVALID TEST_ALREADY_QUARANTINED TEST_BRANCH_NOT_TRACKED TEST_RETRY_NOT_CONFIGURED TEST_STATE_OVERLAPExample Response
{
"detail": "string",
"error_code": "CI_ADMIN_ROLE_REQUIRED",
"documentation_url": "string"
}
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`.
CI_ADMIN_ROLE_REQUIRED CI_ID_TOKEN_AUDIENCE_REFUSED CI_ID_TOKEN_EXCHANGE_NOT_ENABLED 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_SCOPES_TARGET_REFUSED CI_TRACES_UPLOAD_UNUSABLE CI_TRUST_POLICY_NAME_TAKEN COMMAND_RESTRICTED CONFIGURATION_BRANCH_REFUSED CONFIGURATION_INVALID CONFIGURATION_REFUSED_BY_REPOSITORY_RULES CONFIGURATION_SIGNED_COMMITS_REQUIRED DEFAULT_BRANCH_NOT_FOUND GITHUB_ACCOUNT_SUSPENDED GITHUB_APP_ACCESS_LOST GITHUB_RATE_LIMITED GITHUB_UPSTREAM_REQUEST_FORBIDDEN GITHUB_UPSTREAM_REQUEST_REJECTED GITHUB_UPSTREAM_UNAVAILABLE ID_TOKEN_KEY_ROTATION_REFUSED INTEGRATION_NOT_CONFIGURED IP_ALLOW_LIST_NOT_CONFIGURED MERGE_QUEUE_DISABLED MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN MERGE_QUEUE_SETTING_NOT_AVAILABLE NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PIPELINE_NAME_TAKEN PIPELINE_NOT_FOUND PIPELINE_RUN_NOT_FOUND PIPELINE_SECRETS_KEY_ALREADY_ADDED PIPELINE_SECRETS_KEY_IN_USE PIPELINE_SECRETS_KEY_LIMIT_REACHED PIPELINE_SECRETS_KEY_NOT_ACTIVE PIPELINE_SECRETS_KEY_NOT_FOUND PIPELINE_SECRETS_KEY_REPORTED PIPELINE_SECRET_LIMIT_REACHED PIPELINE_SECRET_NAME_TAKEN PIPELINE_SECRET_NOT_FOUND PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS PIPELINE_SECRET_VERSION_CHANGED PULL_REQUEST_ALREADY_QUEUED PULL_REQUEST_NOT_FOUND PULL_REQUEST_NOT_QUEUEABLE PULL_REQUEST_NOT_QUEUED RETRY_RULE_NOT_FOUND SAML_ENFORCEMENT_NOT_AUTHORIZED SETTING_MANAGED_BY_ENV SETUP_ALREADY_DONE SETUP_TOKEN_MISMATCH SUBSCRIPTION_API_UNAVAILABLE SUBSCRIPTION_INACTIVE SUBSCRIPTION_TOKEN_INVALID TEST_ALREADY_QUARANTINED TEST_BRANCH_NOT_TRACKED TEST_RETRY_NOT_CONFIGURED TEST_STATE_OVERLAPExample Response
{
"detail": "string",
"error_code": "CI_ADMIN_ROLE_REQUIRED",
"documentation_url": "string",
"extended_repository": "string"
}
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 #
/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
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
Number of in-progress batches whose checks would be interrupted and restarted if this pull request is dequeued
Number of other pull requests from the interrupted batches that would be re-embarked and rechecked
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
}
403 Forbidden
404 `PULL_REQUEST_NOT_QUEUED`: The pull request is not in any merge queue of the repository.
CI_ADMIN_ROLE_REQUIRED CI_ID_TOKEN_AUDIENCE_REFUSED CI_ID_TOKEN_EXCHANGE_NOT_ENABLED 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_SCOPES_TARGET_REFUSED CI_TRACES_UPLOAD_UNUSABLE CI_TRUST_POLICY_NAME_TAKEN COMMAND_RESTRICTED CONFIGURATION_BRANCH_REFUSED CONFIGURATION_INVALID CONFIGURATION_REFUSED_BY_REPOSITORY_RULES CONFIGURATION_SIGNED_COMMITS_REQUIRED DEFAULT_BRANCH_NOT_FOUND GITHUB_ACCOUNT_SUSPENDED GITHUB_APP_ACCESS_LOST GITHUB_RATE_LIMITED GITHUB_UPSTREAM_REQUEST_FORBIDDEN GITHUB_UPSTREAM_REQUEST_REJECTED GITHUB_UPSTREAM_UNAVAILABLE ID_TOKEN_KEY_ROTATION_REFUSED INTEGRATION_NOT_CONFIGURED IP_ALLOW_LIST_NOT_CONFIGURED MERGE_QUEUE_DISABLED MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN MERGE_QUEUE_SETTING_NOT_AVAILABLE NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PIPELINE_NAME_TAKEN PIPELINE_NOT_FOUND PIPELINE_RUN_NOT_FOUND PIPELINE_SECRETS_KEY_ALREADY_ADDED PIPELINE_SECRETS_KEY_IN_USE PIPELINE_SECRETS_KEY_LIMIT_REACHED PIPELINE_SECRETS_KEY_NOT_ACTIVE PIPELINE_SECRETS_KEY_NOT_FOUND PIPELINE_SECRETS_KEY_REPORTED PIPELINE_SECRET_LIMIT_REACHED PIPELINE_SECRET_NAME_TAKEN PIPELINE_SECRET_NOT_FOUND PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS PIPELINE_SECRET_VERSION_CHANGED PULL_REQUEST_ALREADY_QUEUED PULL_REQUEST_NOT_FOUND PULL_REQUEST_NOT_QUEUEABLE PULL_REQUEST_NOT_QUEUED RETRY_RULE_NOT_FOUND SAML_ENFORCEMENT_NOT_AUTHORIZED SETTING_MANAGED_BY_ENV SETUP_ALREADY_DONE SETUP_TOKEN_MISMATCH SUBSCRIPTION_API_UNAVAILABLE SUBSCRIPTION_INACTIVE SUBSCRIPTION_TOKEN_INVALID TEST_ALREADY_QUARANTINED TEST_BRANCH_NOT_TRACKED TEST_RETRY_NOT_CONFIGURED TEST_STATE_OVERLAPExample Response
{
"detail": "string",
"error_code": "CI_ADMIN_ROLE_REQUIRED",
"documentation_url": "string"
}
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`.
CI_ADMIN_ROLE_REQUIRED CI_ID_TOKEN_AUDIENCE_REFUSED CI_ID_TOKEN_EXCHANGE_NOT_ENABLED 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_SCOPES_TARGET_REFUSED CI_TRACES_UPLOAD_UNUSABLE CI_TRUST_POLICY_NAME_TAKEN COMMAND_RESTRICTED CONFIGURATION_BRANCH_REFUSED CONFIGURATION_INVALID CONFIGURATION_REFUSED_BY_REPOSITORY_RULES CONFIGURATION_SIGNED_COMMITS_REQUIRED DEFAULT_BRANCH_NOT_FOUND GITHUB_ACCOUNT_SUSPENDED GITHUB_APP_ACCESS_LOST GITHUB_RATE_LIMITED GITHUB_UPSTREAM_REQUEST_FORBIDDEN GITHUB_UPSTREAM_REQUEST_REJECTED GITHUB_UPSTREAM_UNAVAILABLE ID_TOKEN_KEY_ROTATION_REFUSED INTEGRATION_NOT_CONFIGURED IP_ALLOW_LIST_NOT_CONFIGURED MERGE_QUEUE_DISABLED MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN MERGE_QUEUE_SETTING_NOT_AVAILABLE NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PIPELINE_NAME_TAKEN PIPELINE_NOT_FOUND PIPELINE_RUN_NOT_FOUND PIPELINE_SECRETS_KEY_ALREADY_ADDED PIPELINE_SECRETS_KEY_IN_USE PIPELINE_SECRETS_KEY_LIMIT_REACHED PIPELINE_SECRETS_KEY_NOT_ACTIVE PIPELINE_SECRETS_KEY_NOT_FOUND PIPELINE_SECRETS_KEY_REPORTED PIPELINE_SECRET_LIMIT_REACHED PIPELINE_SECRET_NAME_TAKEN PIPELINE_SECRET_NOT_FOUND PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS PIPELINE_SECRET_VERSION_CHANGED PULL_REQUEST_ALREADY_QUEUED PULL_REQUEST_NOT_FOUND PULL_REQUEST_NOT_QUEUEABLE PULL_REQUEST_NOT_QUEUED RETRY_RULE_NOT_FOUND SAML_ENFORCEMENT_NOT_AUTHORIZED SETTING_MANAGED_BY_ENV SETUP_ALREADY_DONE SETUP_TOKEN_MISMATCH SUBSCRIPTION_API_UNAVAILABLE SUBSCRIPTION_INACTIVE SUBSCRIPTION_TOKEN_INVALID TEST_ALREADY_QUARANTINED TEST_BRANCH_NOT_TRACKED TEST_RETRY_NOT_CONFIGURED TEST_STATE_OVERLAPExample Response
{
"detail": "string",
"error_code": "CI_ADMIN_ROLE_REQUIRED",
"documentation_url": "string",
"extended_repository": "string"
}
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 #
/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.
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
403 `COMMAND_RESTRICTED`: The `commands_restrictions` of the configuration do not let the caller run this command on the pull request.
CI_ADMIN_ROLE_REQUIRED CI_ID_TOKEN_AUDIENCE_REFUSED CI_ID_TOKEN_EXCHANGE_NOT_ENABLED 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_SCOPES_TARGET_REFUSED CI_TRACES_UPLOAD_UNUSABLE CI_TRUST_POLICY_NAME_TAKEN COMMAND_RESTRICTED CONFIGURATION_BRANCH_REFUSED CONFIGURATION_INVALID CONFIGURATION_REFUSED_BY_REPOSITORY_RULES CONFIGURATION_SIGNED_COMMITS_REQUIRED DEFAULT_BRANCH_NOT_FOUND GITHUB_ACCOUNT_SUSPENDED GITHUB_APP_ACCESS_LOST GITHUB_RATE_LIMITED GITHUB_UPSTREAM_REQUEST_FORBIDDEN GITHUB_UPSTREAM_REQUEST_REJECTED GITHUB_UPSTREAM_UNAVAILABLE ID_TOKEN_KEY_ROTATION_REFUSED INTEGRATION_NOT_CONFIGURED IP_ALLOW_LIST_NOT_CONFIGURED MERGE_QUEUE_DISABLED MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN MERGE_QUEUE_SETTING_NOT_AVAILABLE NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PIPELINE_NAME_TAKEN PIPELINE_NOT_FOUND PIPELINE_RUN_NOT_FOUND PIPELINE_SECRETS_KEY_ALREADY_ADDED PIPELINE_SECRETS_KEY_IN_USE PIPELINE_SECRETS_KEY_LIMIT_REACHED PIPELINE_SECRETS_KEY_NOT_ACTIVE PIPELINE_SECRETS_KEY_NOT_FOUND PIPELINE_SECRETS_KEY_REPORTED PIPELINE_SECRET_LIMIT_REACHED PIPELINE_SECRET_NAME_TAKEN PIPELINE_SECRET_NOT_FOUND PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS PIPELINE_SECRET_VERSION_CHANGED PULL_REQUEST_ALREADY_QUEUED PULL_REQUEST_NOT_FOUND PULL_REQUEST_NOT_QUEUEABLE PULL_REQUEST_NOT_QUEUED RETRY_RULE_NOT_FOUND SAML_ENFORCEMENT_NOT_AUTHORIZED SETTING_MANAGED_BY_ENV SETUP_ALREADY_DONE SETUP_TOKEN_MISMATCH SUBSCRIPTION_API_UNAVAILABLE SUBSCRIPTION_INACTIVE SUBSCRIPTION_TOKEN_INVALID TEST_ALREADY_QUARANTINED TEST_BRANCH_NOT_TRACKED TEST_RETRY_NOT_CONFIGURED TEST_STATE_OVERLAPExample Response
{
"detail": "string",
"error_code": "CI_ADMIN_ROLE_REQUIRED",
"documentation_url": "string"
}
404 `PULL_REQUEST_NOT_FOUND`: The repository has no such pull request.
CI_ADMIN_ROLE_REQUIRED CI_ID_TOKEN_AUDIENCE_REFUSED CI_ID_TOKEN_EXCHANGE_NOT_ENABLED 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_SCOPES_TARGET_REFUSED CI_TRACES_UPLOAD_UNUSABLE CI_TRUST_POLICY_NAME_TAKEN COMMAND_RESTRICTED CONFIGURATION_BRANCH_REFUSED CONFIGURATION_INVALID CONFIGURATION_REFUSED_BY_REPOSITORY_RULES CONFIGURATION_SIGNED_COMMITS_REQUIRED DEFAULT_BRANCH_NOT_FOUND GITHUB_ACCOUNT_SUSPENDED GITHUB_APP_ACCESS_LOST GITHUB_RATE_LIMITED GITHUB_UPSTREAM_REQUEST_FORBIDDEN GITHUB_UPSTREAM_REQUEST_REJECTED GITHUB_UPSTREAM_UNAVAILABLE ID_TOKEN_KEY_ROTATION_REFUSED INTEGRATION_NOT_CONFIGURED IP_ALLOW_LIST_NOT_CONFIGURED MERGE_QUEUE_DISABLED MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN MERGE_QUEUE_SETTING_NOT_AVAILABLE NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PIPELINE_NAME_TAKEN PIPELINE_NOT_FOUND PIPELINE_RUN_NOT_FOUND PIPELINE_SECRETS_KEY_ALREADY_ADDED PIPELINE_SECRETS_KEY_IN_USE PIPELINE_SECRETS_KEY_LIMIT_REACHED PIPELINE_SECRETS_KEY_NOT_ACTIVE PIPELINE_SECRETS_KEY_NOT_FOUND PIPELINE_SECRETS_KEY_REPORTED PIPELINE_SECRET_LIMIT_REACHED PIPELINE_SECRET_NAME_TAKEN PIPELINE_SECRET_NOT_FOUND PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS PIPELINE_SECRET_VERSION_CHANGED PULL_REQUEST_ALREADY_QUEUED PULL_REQUEST_NOT_FOUND PULL_REQUEST_NOT_QUEUEABLE PULL_REQUEST_NOT_QUEUED RETRY_RULE_NOT_FOUND SAML_ENFORCEMENT_NOT_AUTHORIZED SETTING_MANAGED_BY_ENV SETUP_ALREADY_DONE SETUP_TOKEN_MISMATCH SUBSCRIPTION_API_UNAVAILABLE SUBSCRIPTION_INACTIVE SUBSCRIPTION_TOKEN_INVALID TEST_ALREADY_QUARANTINED TEST_BRANCH_NOT_TRACKED TEST_RETRY_NOT_CONFIGURED TEST_STATE_OVERLAPExample Response
{
"detail": "string",
"error_code": "CI_ADMIN_ROLE_REQUIRED",
"documentation_url": "string"
}
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. `MERGE_QUEUE_DISABLED`: The merge queue is not enabled on the repository.
CI_ADMIN_ROLE_REQUIRED CI_ID_TOKEN_AUDIENCE_REFUSED CI_ID_TOKEN_EXCHANGE_NOT_ENABLED 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_SCOPES_TARGET_REFUSED CI_TRACES_UPLOAD_UNUSABLE CI_TRUST_POLICY_NAME_TAKEN COMMAND_RESTRICTED CONFIGURATION_BRANCH_REFUSED CONFIGURATION_INVALID CONFIGURATION_REFUSED_BY_REPOSITORY_RULES CONFIGURATION_SIGNED_COMMITS_REQUIRED DEFAULT_BRANCH_NOT_FOUND GITHUB_ACCOUNT_SUSPENDED GITHUB_APP_ACCESS_LOST GITHUB_RATE_LIMITED GITHUB_UPSTREAM_REQUEST_FORBIDDEN GITHUB_UPSTREAM_REQUEST_REJECTED GITHUB_UPSTREAM_UNAVAILABLE ID_TOKEN_KEY_ROTATION_REFUSED INTEGRATION_NOT_CONFIGURED IP_ALLOW_LIST_NOT_CONFIGURED MERGE_QUEUE_DISABLED MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN MERGE_QUEUE_SETTING_NOT_AVAILABLE NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PIPELINE_NAME_TAKEN PIPELINE_NOT_FOUND PIPELINE_RUN_NOT_FOUND PIPELINE_SECRETS_KEY_ALREADY_ADDED PIPELINE_SECRETS_KEY_IN_USE PIPELINE_SECRETS_KEY_LIMIT_REACHED PIPELINE_SECRETS_KEY_NOT_ACTIVE PIPELINE_SECRETS_KEY_NOT_FOUND PIPELINE_SECRETS_KEY_REPORTED PIPELINE_SECRET_LIMIT_REACHED PIPELINE_SECRET_NAME_TAKEN PIPELINE_SECRET_NOT_FOUND PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS PIPELINE_SECRET_VERSION_CHANGED PULL_REQUEST_ALREADY_QUEUED PULL_REQUEST_NOT_FOUND PULL_REQUEST_NOT_QUEUEABLE PULL_REQUEST_NOT_QUEUED RETRY_RULE_NOT_FOUND SAML_ENFORCEMENT_NOT_AUTHORIZED SETTING_MANAGED_BY_ENV SETUP_ALREADY_DONE SETUP_TOKEN_MISMATCH SUBSCRIPTION_API_UNAVAILABLE SUBSCRIPTION_INACTIVE SUBSCRIPTION_TOKEN_INVALID TEST_ALREADY_QUARANTINED TEST_BRANCH_NOT_TRACKED TEST_RETRY_NOT_CONFIGURED TEST_STATE_OVERLAPExample Response
{
"detail": "string",
"error_code": "CI_ADMIN_ROLE_REQUIRED",
"documentation_url": "string"
}
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`.
CI_ADMIN_ROLE_REQUIRED CI_ID_TOKEN_AUDIENCE_REFUSED CI_ID_TOKEN_EXCHANGE_NOT_ENABLED 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_SCOPES_TARGET_REFUSED CI_TRACES_UPLOAD_UNUSABLE CI_TRUST_POLICY_NAME_TAKEN COMMAND_RESTRICTED CONFIGURATION_BRANCH_REFUSED CONFIGURATION_INVALID CONFIGURATION_REFUSED_BY_REPOSITORY_RULES CONFIGURATION_SIGNED_COMMITS_REQUIRED DEFAULT_BRANCH_NOT_FOUND GITHUB_ACCOUNT_SUSPENDED GITHUB_APP_ACCESS_LOST GITHUB_RATE_LIMITED GITHUB_UPSTREAM_REQUEST_FORBIDDEN GITHUB_UPSTREAM_REQUEST_REJECTED GITHUB_UPSTREAM_UNAVAILABLE ID_TOKEN_KEY_ROTATION_REFUSED INTEGRATION_NOT_CONFIGURED IP_ALLOW_LIST_NOT_CONFIGURED MERGE_QUEUE_DISABLED MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN MERGE_QUEUE_SETTING_NOT_AVAILABLE NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PIPELINE_NAME_TAKEN PIPELINE_NOT_FOUND PIPELINE_RUN_NOT_FOUND PIPELINE_SECRETS_KEY_ALREADY_ADDED PIPELINE_SECRETS_KEY_IN_USE PIPELINE_SECRETS_KEY_LIMIT_REACHED PIPELINE_SECRETS_KEY_NOT_ACTIVE PIPELINE_SECRETS_KEY_NOT_FOUND PIPELINE_SECRETS_KEY_REPORTED PIPELINE_SECRET_LIMIT_REACHED PIPELINE_SECRET_NAME_TAKEN PIPELINE_SECRET_NOT_FOUND PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS PIPELINE_SECRET_VERSION_CHANGED PULL_REQUEST_ALREADY_QUEUED PULL_REQUEST_NOT_FOUND PULL_REQUEST_NOT_QUEUEABLE PULL_REQUEST_NOT_QUEUED RETRY_RULE_NOT_FOUND SAML_ENFORCEMENT_NOT_AUTHORIZED SETTING_MANAGED_BY_ENV SETUP_ALREADY_DONE SETUP_TOKEN_MISMATCH SUBSCRIPTION_API_UNAVAILABLE SUBSCRIPTION_INACTIVE SUBSCRIPTION_TOKEN_INVALID TEST_ALREADY_QUARANTINED TEST_BRANCH_NOT_TRACKED TEST_RETRY_NOT_CONFIGURED TEST_STATE_OVERLAPExample Response
{
"detail": "string",
"error_code": "CI_ADMIN_ROLE_REQUIRED",
"documentation_url": "string",
"extended_repository": "string"
}
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 #
/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
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
403 `COMMAND_RESTRICTED`: The `commands_restrictions` of the configuration do not let the caller run this command on the pull request.
CI_ADMIN_ROLE_REQUIRED CI_ID_TOKEN_AUDIENCE_REFUSED CI_ID_TOKEN_EXCHANGE_NOT_ENABLED 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_SCOPES_TARGET_REFUSED CI_TRACES_UPLOAD_UNUSABLE CI_TRUST_POLICY_NAME_TAKEN COMMAND_RESTRICTED CONFIGURATION_BRANCH_REFUSED CONFIGURATION_INVALID CONFIGURATION_REFUSED_BY_REPOSITORY_RULES CONFIGURATION_SIGNED_COMMITS_REQUIRED DEFAULT_BRANCH_NOT_FOUND GITHUB_ACCOUNT_SUSPENDED GITHUB_APP_ACCESS_LOST GITHUB_RATE_LIMITED GITHUB_UPSTREAM_REQUEST_FORBIDDEN GITHUB_UPSTREAM_REQUEST_REJECTED GITHUB_UPSTREAM_UNAVAILABLE ID_TOKEN_KEY_ROTATION_REFUSED INTEGRATION_NOT_CONFIGURED IP_ALLOW_LIST_NOT_CONFIGURED MERGE_QUEUE_DISABLED MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN MERGE_QUEUE_SETTING_NOT_AVAILABLE NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PIPELINE_NAME_TAKEN PIPELINE_NOT_FOUND PIPELINE_RUN_NOT_FOUND PIPELINE_SECRETS_KEY_ALREADY_ADDED PIPELINE_SECRETS_KEY_IN_USE PIPELINE_SECRETS_KEY_LIMIT_REACHED PIPELINE_SECRETS_KEY_NOT_ACTIVE PIPELINE_SECRETS_KEY_NOT_FOUND PIPELINE_SECRETS_KEY_REPORTED PIPELINE_SECRET_LIMIT_REACHED PIPELINE_SECRET_NAME_TAKEN PIPELINE_SECRET_NOT_FOUND PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS PIPELINE_SECRET_VERSION_CHANGED PULL_REQUEST_ALREADY_QUEUED PULL_REQUEST_NOT_FOUND PULL_REQUEST_NOT_QUEUEABLE PULL_REQUEST_NOT_QUEUED RETRY_RULE_NOT_FOUND SAML_ENFORCEMENT_NOT_AUTHORIZED SETTING_MANAGED_BY_ENV SETUP_ALREADY_DONE SETUP_TOKEN_MISMATCH SUBSCRIPTION_API_UNAVAILABLE SUBSCRIPTION_INACTIVE SUBSCRIPTION_TOKEN_INVALID TEST_ALREADY_QUARANTINED TEST_BRANCH_NOT_TRACKED TEST_RETRY_NOT_CONFIGURED TEST_STATE_OVERLAPExample Response
{
"detail": "string",
"error_code": "CI_ADMIN_ROLE_REQUIRED",
"documentation_url": "string"
}
404 `PULL_REQUEST_NOT_QUEUED`: The pull request is not in any merge queue of the repository.
CI_ADMIN_ROLE_REQUIRED CI_ID_TOKEN_AUDIENCE_REFUSED CI_ID_TOKEN_EXCHANGE_NOT_ENABLED 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_SCOPES_TARGET_REFUSED CI_TRACES_UPLOAD_UNUSABLE CI_TRUST_POLICY_NAME_TAKEN COMMAND_RESTRICTED CONFIGURATION_BRANCH_REFUSED CONFIGURATION_INVALID CONFIGURATION_REFUSED_BY_REPOSITORY_RULES CONFIGURATION_SIGNED_COMMITS_REQUIRED DEFAULT_BRANCH_NOT_FOUND GITHUB_ACCOUNT_SUSPENDED GITHUB_APP_ACCESS_LOST GITHUB_RATE_LIMITED GITHUB_UPSTREAM_REQUEST_FORBIDDEN GITHUB_UPSTREAM_REQUEST_REJECTED GITHUB_UPSTREAM_UNAVAILABLE ID_TOKEN_KEY_ROTATION_REFUSED INTEGRATION_NOT_CONFIGURED IP_ALLOW_LIST_NOT_CONFIGURED MERGE_QUEUE_DISABLED MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN MERGE_QUEUE_SETTING_NOT_AVAILABLE NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PIPELINE_NAME_TAKEN PIPELINE_NOT_FOUND PIPELINE_RUN_NOT_FOUND PIPELINE_SECRETS_KEY_ALREADY_ADDED PIPELINE_SECRETS_KEY_IN_USE PIPELINE_SECRETS_KEY_LIMIT_REACHED PIPELINE_SECRETS_KEY_NOT_ACTIVE PIPELINE_SECRETS_KEY_NOT_FOUND PIPELINE_SECRETS_KEY_REPORTED PIPELINE_SECRET_LIMIT_REACHED PIPELINE_SECRET_NAME_TAKEN PIPELINE_SECRET_NOT_FOUND PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS PIPELINE_SECRET_VERSION_CHANGED PULL_REQUEST_ALREADY_QUEUED PULL_REQUEST_NOT_FOUND PULL_REQUEST_NOT_QUEUEABLE PULL_REQUEST_NOT_QUEUED RETRY_RULE_NOT_FOUND SAML_ENFORCEMENT_NOT_AUTHORIZED SETTING_MANAGED_BY_ENV SETUP_ALREADY_DONE SETUP_TOKEN_MISMATCH SUBSCRIPTION_API_UNAVAILABLE SUBSCRIPTION_INACTIVE SUBSCRIPTION_TOKEN_INVALID TEST_ALREADY_QUARANTINED TEST_BRANCH_NOT_TRACKED TEST_RETRY_NOT_CONFIGURED TEST_STATE_OVERLAPExample Response
{
"detail": "string",
"error_code": "CI_ADMIN_ROLE_REQUIRED",
"documentation_url": "string"
}
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`.
CI_ADMIN_ROLE_REQUIRED CI_ID_TOKEN_AUDIENCE_REFUSED CI_ID_TOKEN_EXCHANGE_NOT_ENABLED 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_SCOPES_TARGET_REFUSED CI_TRACES_UPLOAD_UNUSABLE CI_TRUST_POLICY_NAME_TAKEN COMMAND_RESTRICTED CONFIGURATION_BRANCH_REFUSED CONFIGURATION_INVALID CONFIGURATION_REFUSED_BY_REPOSITORY_RULES CONFIGURATION_SIGNED_COMMITS_REQUIRED DEFAULT_BRANCH_NOT_FOUND GITHUB_ACCOUNT_SUSPENDED GITHUB_APP_ACCESS_LOST GITHUB_RATE_LIMITED GITHUB_UPSTREAM_REQUEST_FORBIDDEN GITHUB_UPSTREAM_REQUEST_REJECTED GITHUB_UPSTREAM_UNAVAILABLE ID_TOKEN_KEY_ROTATION_REFUSED INTEGRATION_NOT_CONFIGURED IP_ALLOW_LIST_NOT_CONFIGURED MERGE_QUEUE_DISABLED MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN MERGE_QUEUE_SETTING_NOT_AVAILABLE NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PIPELINE_NAME_TAKEN PIPELINE_NOT_FOUND PIPELINE_RUN_NOT_FOUND PIPELINE_SECRETS_KEY_ALREADY_ADDED PIPELINE_SECRETS_KEY_IN_USE PIPELINE_SECRETS_KEY_LIMIT_REACHED PIPELINE_SECRETS_KEY_NOT_ACTIVE PIPELINE_SECRETS_KEY_NOT_FOUND PIPELINE_SECRETS_KEY_REPORTED PIPELINE_SECRET_LIMIT_REACHED PIPELINE_SECRET_NAME_TAKEN PIPELINE_SECRET_NOT_FOUND PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS PIPELINE_SECRET_VERSION_CHANGED PULL_REQUEST_ALREADY_QUEUED PULL_REQUEST_NOT_FOUND PULL_REQUEST_NOT_QUEUEABLE PULL_REQUEST_NOT_QUEUED RETRY_RULE_NOT_FOUND SAML_ENFORCEMENT_NOT_AUTHORIZED SETTING_MANAGED_BY_ENV SETUP_ALREADY_DONE SETUP_TOKEN_MISMATCH SUBSCRIPTION_API_UNAVAILABLE SUBSCRIPTION_INACTIVE SUBSCRIPTION_TOKEN_INVALID TEST_ALREADY_QUARANTINED TEST_BRANCH_NOT_TRACKED TEST_RETRY_NOT_CONFIGURED TEST_STATE_OVERLAPExample Response
{
"detail": "string",
"error_code": "CI_ADMIN_ROLE_REQUIRED",
"documentation_url": "string",
"extended_repository": "string"
}
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 #
/repos/{owner}/{repository}/merge-queue/pause
Pause the merge of the requested repository
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\-]+$
The reason of the merge queue pause
200 Successful Response
Whether the merge queue is currently paused
The reason of the merge queue pause
The date and time when the merge queue was paused
Example Response
{
"paused": true,
"reason": "string",
"paused_at": "2024-01-15T09:00:00Z"
}
403 Forbidden
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`.
CI_ADMIN_ROLE_REQUIRED CI_ID_TOKEN_AUDIENCE_REFUSED CI_ID_TOKEN_EXCHANGE_NOT_ENABLED 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_SCOPES_TARGET_REFUSED CI_TRACES_UPLOAD_UNUSABLE CI_TRUST_POLICY_NAME_TAKEN COMMAND_RESTRICTED CONFIGURATION_BRANCH_REFUSED CONFIGURATION_INVALID CONFIGURATION_REFUSED_BY_REPOSITORY_RULES CONFIGURATION_SIGNED_COMMITS_REQUIRED DEFAULT_BRANCH_NOT_FOUND GITHUB_ACCOUNT_SUSPENDED GITHUB_APP_ACCESS_LOST GITHUB_RATE_LIMITED GITHUB_UPSTREAM_REQUEST_FORBIDDEN GITHUB_UPSTREAM_REQUEST_REJECTED GITHUB_UPSTREAM_UNAVAILABLE ID_TOKEN_KEY_ROTATION_REFUSED INTEGRATION_NOT_CONFIGURED IP_ALLOW_LIST_NOT_CONFIGURED MERGE_QUEUE_DISABLED MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN MERGE_QUEUE_SETTING_NOT_AVAILABLE NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PIPELINE_NAME_TAKEN PIPELINE_NOT_FOUND PIPELINE_RUN_NOT_FOUND PIPELINE_SECRETS_KEY_ALREADY_ADDED PIPELINE_SECRETS_KEY_IN_USE PIPELINE_SECRETS_KEY_LIMIT_REACHED PIPELINE_SECRETS_KEY_NOT_ACTIVE PIPELINE_SECRETS_KEY_NOT_FOUND PIPELINE_SECRETS_KEY_REPORTED PIPELINE_SECRET_LIMIT_REACHED PIPELINE_SECRET_NAME_TAKEN PIPELINE_SECRET_NOT_FOUND PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS PIPELINE_SECRET_VERSION_CHANGED PULL_REQUEST_ALREADY_QUEUED PULL_REQUEST_NOT_FOUND PULL_REQUEST_NOT_QUEUEABLE PULL_REQUEST_NOT_QUEUED RETRY_RULE_NOT_FOUND SAML_ENFORCEMENT_NOT_AUTHORIZED SETTING_MANAGED_BY_ENV SETUP_ALREADY_DONE SETUP_TOKEN_MISMATCH SUBSCRIPTION_API_UNAVAILABLE SUBSCRIPTION_INACTIVE SUBSCRIPTION_TOKEN_INVALID TEST_ALREADY_QUARANTINED TEST_BRANCH_NOT_TRACKED TEST_RETRY_NOT_CONFIGURED TEST_STATE_OVERLAPExample Response
{
"detail": "string",
"error_code": "CI_ADMIN_ROLE_REQUIRED",
"documentation_url": "string",
"extended_repository": "string"
}
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 #
/repos/{owner}/{repository}/merge-queue/pause
Unpause the merge queue of the requested repository
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
403 Forbidden
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`.
CI_ADMIN_ROLE_REQUIRED CI_ID_TOKEN_AUDIENCE_REFUSED CI_ID_TOKEN_EXCHANGE_NOT_ENABLED 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_SCOPES_TARGET_REFUSED CI_TRACES_UPLOAD_UNUSABLE CI_TRUST_POLICY_NAME_TAKEN COMMAND_RESTRICTED CONFIGURATION_BRANCH_REFUSED CONFIGURATION_INVALID CONFIGURATION_REFUSED_BY_REPOSITORY_RULES CONFIGURATION_SIGNED_COMMITS_REQUIRED DEFAULT_BRANCH_NOT_FOUND GITHUB_ACCOUNT_SUSPENDED GITHUB_APP_ACCESS_LOST GITHUB_RATE_LIMITED GITHUB_UPSTREAM_REQUEST_FORBIDDEN GITHUB_UPSTREAM_REQUEST_REJECTED GITHUB_UPSTREAM_UNAVAILABLE ID_TOKEN_KEY_ROTATION_REFUSED INTEGRATION_NOT_CONFIGURED IP_ALLOW_LIST_NOT_CONFIGURED MERGE_QUEUE_DISABLED MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN MERGE_QUEUE_SETTING_NOT_AVAILABLE NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PIPELINE_NAME_TAKEN PIPELINE_NOT_FOUND PIPELINE_RUN_NOT_FOUND PIPELINE_SECRETS_KEY_ALREADY_ADDED PIPELINE_SECRETS_KEY_IN_USE PIPELINE_SECRETS_KEY_LIMIT_REACHED PIPELINE_SECRETS_KEY_NOT_ACTIVE PIPELINE_SECRETS_KEY_NOT_FOUND PIPELINE_SECRETS_KEY_REPORTED PIPELINE_SECRET_LIMIT_REACHED PIPELINE_SECRET_NAME_TAKEN PIPELINE_SECRET_NOT_FOUND PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS PIPELINE_SECRET_VERSION_CHANGED PULL_REQUEST_ALREADY_QUEUED PULL_REQUEST_NOT_FOUND PULL_REQUEST_NOT_QUEUEABLE PULL_REQUEST_NOT_QUEUED RETRY_RULE_NOT_FOUND SAML_ENFORCEMENT_NOT_AUTHORIZED SETTING_MANAGED_BY_ENV SETUP_ALREADY_DONE SETUP_TOKEN_MISMATCH SUBSCRIPTION_API_UNAVAILABLE SUBSCRIPTION_INACTIVE SUBSCRIPTION_TOKEN_INVALID TEST_ALREADY_QUARANTINED TEST_BRANCH_NOT_TRACKED TEST_RETRY_NOT_CONFIGURED TEST_STATE_OVERLAPExample Response
{
"detail": "string",
"error_code": "CI_ADMIN_ROLE_REQUIRED",
"documentation_url": "string",
"extended_repository": "string"
}
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 #
/repos/{owner}/{repository}/merge-queue/pause
Checks if the merge queue is paused and returns the pause data
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
Whether the merge queue is currently paused
The reason of the merge queue pause
The date and time when the merge queue was paused
Example Response
{
"paused": true,
"reason": "string",
"paused_at": "2024-01-15T09:00:00Z"
}
403 Forbidden
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`.
CI_ADMIN_ROLE_REQUIRED CI_ID_TOKEN_AUDIENCE_REFUSED CI_ID_TOKEN_EXCHANGE_NOT_ENABLED 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_SCOPES_TARGET_REFUSED CI_TRACES_UPLOAD_UNUSABLE CI_TRUST_POLICY_NAME_TAKEN COMMAND_RESTRICTED CONFIGURATION_BRANCH_REFUSED CONFIGURATION_INVALID CONFIGURATION_REFUSED_BY_REPOSITORY_RULES CONFIGURATION_SIGNED_COMMITS_REQUIRED DEFAULT_BRANCH_NOT_FOUND GITHUB_ACCOUNT_SUSPENDED GITHUB_APP_ACCESS_LOST GITHUB_RATE_LIMITED GITHUB_UPSTREAM_REQUEST_FORBIDDEN GITHUB_UPSTREAM_REQUEST_REJECTED GITHUB_UPSTREAM_UNAVAILABLE ID_TOKEN_KEY_ROTATION_REFUSED INTEGRATION_NOT_CONFIGURED IP_ALLOW_LIST_NOT_CONFIGURED MERGE_QUEUE_DISABLED MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN MERGE_QUEUE_SETTING_NOT_AVAILABLE NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PIPELINE_NAME_TAKEN PIPELINE_NOT_FOUND PIPELINE_RUN_NOT_FOUND PIPELINE_SECRETS_KEY_ALREADY_ADDED PIPELINE_SECRETS_KEY_IN_USE PIPELINE_SECRETS_KEY_LIMIT_REACHED PIPELINE_SECRETS_KEY_NOT_ACTIVE PIPELINE_SECRETS_KEY_NOT_FOUND PIPELINE_SECRETS_KEY_REPORTED PIPELINE_SECRET_LIMIT_REACHED PIPELINE_SECRET_NAME_TAKEN PIPELINE_SECRET_NOT_FOUND PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS PIPELINE_SECRET_VERSION_CHANGED PULL_REQUEST_ALREADY_QUEUED PULL_REQUEST_NOT_FOUND PULL_REQUEST_NOT_QUEUEABLE PULL_REQUEST_NOT_QUEUED RETRY_RULE_NOT_FOUND SAML_ENFORCEMENT_NOT_AUTHORIZED SETTING_MANAGED_BY_ENV SETUP_ALREADY_DONE SETUP_TOKEN_MISMATCH SUBSCRIPTION_API_UNAVAILABLE SUBSCRIPTION_INACTIVE SUBSCRIPTION_TOKEN_INVALID TEST_ALREADY_QUARANTINED TEST_BRANCH_NOT_TRACKED TEST_RETRY_NOT_CONFIGURED TEST_STATE_OVERLAPExample Response
{
"detail": "string",
"error_code": "CI_ADMIN_ROLE_REQUIRED",
"documentation_url": "string",
"extended_repository": "string"
}
Example Request
curl -X GET "https://api.mergify.com/v1/repos/:owner/:repository/merge-queue/pause" \
-H "Authorization: Bearer <token>"
Get the merge queue settings of a repository #
/repos/{owner}/{repository}/merge-queue/settings
Get what the repository sets of the merge queue settings of its base branches: a base branch may override each value, and a value the repository leaves `null` comes from its organization
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
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: fast-forward`, `queue_branch_merge_method: fast-forward` or `allow_queue_branch_edit`, or `merge_method: merge-batch` outside the `serial` 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`. `null` leaves it to the level above.
Example Response
{
"batch_pull_request": true
}
403 Forbidden
404 Not found
409 Conflict
422 Unprocessable entity
Example Request
curl -X GET "https://api.mergify.com/v1/repos/:owner/:repository/merge-queue/settings" \
-H "Authorization: Bearer <token>"
Update the merge queue settings of a repository #
/repos/{owner}/{repository}/merge-queue/settings
Replace what the repository sets of the merge queue settings of its base branches. Requires the admin role.
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\-]+$
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: fast-forward`, `queue_branch_merge_method: fast-forward` or `allow_queue_branch_edit`, or `merge_method: merge-batch` outside the `serial` 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`. `null` leaves it to the level above.
200 Successful Response
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: fast-forward`, `queue_branch_merge_method: fast-forward` or `allow_queue_branch_edit`, or `merge_method: merge-batch` outside the `serial` 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`. `null` leaves it to the level above.
Example Response
{
"batch_pull_request": true
}
403 `MERGE_QUEUE_SETTING_NOT_AVAILABLE`: `batch_pull_request: false` is not available to this organization yet. Contact Mergify Support to have it enabled for your organization.
CI_ADMIN_ROLE_REQUIRED CI_ID_TOKEN_AUDIENCE_REFUSED CI_ID_TOKEN_EXCHANGE_NOT_ENABLED 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_SCOPES_TARGET_REFUSED CI_TRACES_UPLOAD_UNUSABLE CI_TRUST_POLICY_NAME_TAKEN COMMAND_RESTRICTED CONFIGURATION_BRANCH_REFUSED CONFIGURATION_INVALID CONFIGURATION_REFUSED_BY_REPOSITORY_RULES CONFIGURATION_SIGNED_COMMITS_REQUIRED DEFAULT_BRANCH_NOT_FOUND GITHUB_ACCOUNT_SUSPENDED GITHUB_APP_ACCESS_LOST GITHUB_RATE_LIMITED GITHUB_UPSTREAM_REQUEST_FORBIDDEN GITHUB_UPSTREAM_REQUEST_REJECTED GITHUB_UPSTREAM_UNAVAILABLE ID_TOKEN_KEY_ROTATION_REFUSED INTEGRATION_NOT_CONFIGURED IP_ALLOW_LIST_NOT_CONFIGURED MERGE_QUEUE_DISABLED MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN MERGE_QUEUE_SETTING_NOT_AVAILABLE NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PIPELINE_NAME_TAKEN PIPELINE_NOT_FOUND PIPELINE_RUN_NOT_FOUND PIPELINE_SECRETS_KEY_ALREADY_ADDED PIPELINE_SECRETS_KEY_IN_USE PIPELINE_SECRETS_KEY_LIMIT_REACHED PIPELINE_SECRETS_KEY_NOT_ACTIVE PIPELINE_SECRETS_KEY_NOT_FOUND PIPELINE_SECRETS_KEY_REPORTED PIPELINE_SECRET_LIMIT_REACHED PIPELINE_SECRET_NAME_TAKEN PIPELINE_SECRET_NOT_FOUND PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS PIPELINE_SECRET_VERSION_CHANGED PULL_REQUEST_ALREADY_QUEUED PULL_REQUEST_NOT_FOUND PULL_REQUEST_NOT_QUEUEABLE PULL_REQUEST_NOT_QUEUED RETRY_RULE_NOT_FOUND SAML_ENFORCEMENT_NOT_AUTHORIZED SETTING_MANAGED_BY_ENV SETUP_ALREADY_DONE SETUP_TOKEN_MISMATCH SUBSCRIPTION_API_UNAVAILABLE SUBSCRIPTION_INACTIVE SUBSCRIPTION_TOKEN_INVALID TEST_ALREADY_QUARANTINED TEST_BRANCH_NOT_TRACKED TEST_RETRY_NOT_CONFIGURED TEST_STATE_OVERLAPExample Response
{
"detail": "string",
"error_code": "CI_ADMIN_ROLE_REQUIRED",
"documentation_url": "string"
}
404 Not found
409 Conflict
422 Unprocessable entity
Example Request
curl -X PUT "https://api.mergify.com/v1/repos/:owner/:repository/merge-queue/settings" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"batch_pull_request": true
}'
Reset the merge queue settings of a repository #
/repos/{owner}/{repository}/merge-queue/settings
Unset every merge queue setting of the repository, which its base branches then take from the organization. Requires the admin role.
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
403 Forbidden
404 Not found
409 Conflict
422 Unprocessable entity
Example Request
curl -X DELETE "https://api.mergify.com/v1/repos/:owner/:repository/merge-queue/settings" \
-H "Authorization: Bearer <token>"
List the merge queue settings of the base branches #
/repos/{owner}/{repository}/merge-queue/settings/branches
List each base branch name and pattern of the repository that sets a merge queue setting
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
Example Response
{
"branches": [
{
"batch_pull_request": true,
"branch": "string",
"is_pattern": true
}
]
}
403 Forbidden
404 Not found
409 Conflict
422 Unprocessable entity
Example Request
curl -X GET "https://api.mergify.com/v1/repos/:owner/:repository/merge-queue/settings/branches" \
-H "Authorization: Bearer <token>"
Get the merge queue settings of a base branch name or pattern #
/repos/{owner}/{repository}/merge-queue/settings/branches/{branch}
Get what a base branch name or pattern sets of the merge queue settings: every value `null` when it sets none. What a base branch ends up with is `GET /repos/{owner}/{repository}/branches/{branch}/merge-queue/settings`.
branch
string
required
A base branch name, or a glob pattern matching base branch names as the `*=` condition operator does (`release/*`, `stable/**`). A literal `{`, `}` or `,` in a branch name is escaped with `\`.
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
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: fast-forward`, `queue_branch_merge_method: fast-forward` or `allow_queue_branch_edit`, or `merge_method: merge-batch` outside the `serial` 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`. `null` leaves it to the level above.
Example Response
{
"batch_pull_request": true
}
403 Forbidden
404 Not found
409 Conflict
422 Unprocessable entity
Example Request
curl -X GET "https://api.mergify.com/v1/repos/:owner/:repository/merge-queue/settings/branches/:branch" \
-H "Authorization: Bearer <token>"
Update the merge queue settings of a base branch name or pattern #
/repos/{owner}/{repository}/merge-queue/settings/branches/{branch}
Replace what a base branch name or pattern sets of the merge queue settings. The branches need not exist yet. Requires the admin role.
branch
string
required
A base branch name, or a glob pattern matching base branch names as the `*=` condition operator does (`release/*`, `stable/**`). A literal `{`, `}` or `,` in a branch name is escaped with `\`.
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\-]+$
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: fast-forward`, `queue_branch_merge_method: fast-forward` or `allow_queue_branch_edit`, or `merge_method: merge-batch` outside the `serial` 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`. `null` leaves it to the level above.
200 Successful Response
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: fast-forward`, `queue_branch_merge_method: fast-forward` or `allow_queue_branch_edit`, or `merge_method: merge-batch` outside the `serial` 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`. `null` leaves it to the level above.
Example Response
{
"batch_pull_request": true
}
403 `MERGE_QUEUE_SETTING_NOT_AVAILABLE`: `batch_pull_request: false` is not available to this organization yet. Contact Mergify Support to have it enabled for your organization.
CI_ADMIN_ROLE_REQUIRED CI_ID_TOKEN_AUDIENCE_REFUSED CI_ID_TOKEN_EXCHANGE_NOT_ENABLED 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_SCOPES_TARGET_REFUSED CI_TRACES_UPLOAD_UNUSABLE CI_TRUST_POLICY_NAME_TAKEN COMMAND_RESTRICTED CONFIGURATION_BRANCH_REFUSED CONFIGURATION_INVALID CONFIGURATION_REFUSED_BY_REPOSITORY_RULES CONFIGURATION_SIGNED_COMMITS_REQUIRED DEFAULT_BRANCH_NOT_FOUND GITHUB_ACCOUNT_SUSPENDED GITHUB_APP_ACCESS_LOST GITHUB_RATE_LIMITED GITHUB_UPSTREAM_REQUEST_FORBIDDEN GITHUB_UPSTREAM_REQUEST_REJECTED GITHUB_UPSTREAM_UNAVAILABLE ID_TOKEN_KEY_ROTATION_REFUSED INTEGRATION_NOT_CONFIGURED IP_ALLOW_LIST_NOT_CONFIGURED MERGE_QUEUE_DISABLED MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN MERGE_QUEUE_SETTING_NOT_AVAILABLE NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PIPELINE_NAME_TAKEN PIPELINE_NOT_FOUND PIPELINE_RUN_NOT_FOUND PIPELINE_SECRETS_KEY_ALREADY_ADDED PIPELINE_SECRETS_KEY_IN_USE PIPELINE_SECRETS_KEY_LIMIT_REACHED PIPELINE_SECRETS_KEY_NOT_ACTIVE PIPELINE_SECRETS_KEY_NOT_FOUND PIPELINE_SECRETS_KEY_REPORTED PIPELINE_SECRET_LIMIT_REACHED PIPELINE_SECRET_NAME_TAKEN PIPELINE_SECRET_NOT_FOUND PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS PIPELINE_SECRET_VERSION_CHANGED PULL_REQUEST_ALREADY_QUEUED PULL_REQUEST_NOT_FOUND PULL_REQUEST_NOT_QUEUEABLE PULL_REQUEST_NOT_QUEUED RETRY_RULE_NOT_FOUND SAML_ENFORCEMENT_NOT_AUTHORIZED SETTING_MANAGED_BY_ENV SETUP_ALREADY_DONE SETUP_TOKEN_MISMATCH SUBSCRIPTION_API_UNAVAILABLE SUBSCRIPTION_INACTIVE SUBSCRIPTION_TOKEN_INVALID TEST_ALREADY_QUARANTINED TEST_BRANCH_NOT_TRACKED TEST_RETRY_NOT_CONFIGURED TEST_STATE_OVERLAPExample Response
{
"detail": "string",
"error_code": "CI_ADMIN_ROLE_REQUIRED",
"documentation_url": "string"
}
404 Not found
409 Conflict
422 `MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN`: The base branch pattern is not a valid glob pattern.
CI_ADMIN_ROLE_REQUIRED CI_ID_TOKEN_AUDIENCE_REFUSED CI_ID_TOKEN_EXCHANGE_NOT_ENABLED 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_SCOPES_TARGET_REFUSED CI_TRACES_UPLOAD_UNUSABLE CI_TRUST_POLICY_NAME_TAKEN COMMAND_RESTRICTED CONFIGURATION_BRANCH_REFUSED CONFIGURATION_INVALID CONFIGURATION_REFUSED_BY_REPOSITORY_RULES CONFIGURATION_SIGNED_COMMITS_REQUIRED DEFAULT_BRANCH_NOT_FOUND GITHUB_ACCOUNT_SUSPENDED GITHUB_APP_ACCESS_LOST GITHUB_RATE_LIMITED GITHUB_UPSTREAM_REQUEST_FORBIDDEN GITHUB_UPSTREAM_REQUEST_REJECTED GITHUB_UPSTREAM_UNAVAILABLE ID_TOKEN_KEY_ROTATION_REFUSED INTEGRATION_NOT_CONFIGURED IP_ALLOW_LIST_NOT_CONFIGURED MERGE_QUEUE_DISABLED MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN MERGE_QUEUE_SETTING_NOT_AVAILABLE NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PIPELINE_NAME_TAKEN PIPELINE_NOT_FOUND PIPELINE_RUN_NOT_FOUND PIPELINE_SECRETS_KEY_ALREADY_ADDED PIPELINE_SECRETS_KEY_IN_USE PIPELINE_SECRETS_KEY_LIMIT_REACHED PIPELINE_SECRETS_KEY_NOT_ACTIVE PIPELINE_SECRETS_KEY_NOT_FOUND PIPELINE_SECRETS_KEY_REPORTED PIPELINE_SECRET_LIMIT_REACHED PIPELINE_SECRET_NAME_TAKEN PIPELINE_SECRET_NOT_FOUND PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS PIPELINE_SECRET_VERSION_CHANGED PULL_REQUEST_ALREADY_QUEUED PULL_REQUEST_NOT_FOUND PULL_REQUEST_NOT_QUEUEABLE PULL_REQUEST_NOT_QUEUED RETRY_RULE_NOT_FOUND SAML_ENFORCEMENT_NOT_AUTHORIZED SETTING_MANAGED_BY_ENV SETUP_ALREADY_DONE SETUP_TOKEN_MISMATCH SUBSCRIPTION_API_UNAVAILABLE SUBSCRIPTION_INACTIVE SUBSCRIPTION_TOKEN_INVALID TEST_ALREADY_QUARANTINED TEST_BRANCH_NOT_TRACKED TEST_RETRY_NOT_CONFIGURED TEST_STATE_OVERLAPExample Response
{
"detail": "string",
"error_code": "CI_ADMIN_ROLE_REQUIRED",
"documentation_url": "string"
}
Example Request
curl -X PUT "https://api.mergify.com/v1/repos/:owner/:repository/merge-queue/settings/branches/:branch" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"batch_pull_request": true
}'
Reset the merge queue settings of a base branch name or pattern #
/repos/{owner}/{repository}/merge-queue/settings/branches/{branch}
Unset every merge queue setting of a base branch name or pattern: the branches it named take them from the next pattern matching them, then from the repository. Requires the admin role.
branch
string
required
A base branch name, or a glob pattern matching base branch names as the `*=` condition operator does (`release/*`, `stable/**`). A literal `{`, `}` or `,` in a branch name is escaped with `\`.
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\-]+$
204 Successful Response
403 Forbidden
404 Not found
409 Conflict
422 Unprocessable entity
Example Request
curl -X DELETE "https://api.mergify.com/v1/repos/:owner/:repository/merge-queue/settings/branches/:branch" \
-H "Authorization: Bearer <token>"
Get the merge queue settings a base branch uses #
/repos/{owner}/{repository}/branches/{branch}/merge-queue/settings
Get the merge queue settings of a base branch once its levels are resolved, each with the level, and the branch name or pattern, it comes from
branch
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
The name of the base branch
Example Response
{
"branch": "string",
"settings": {
"batch_pull_request": true
},
"sources": {
"batch_pull_request": {
"level": "branch",
"branch": "string"
}
}
}
403 Forbidden
404 Not found
409 Conflict
422 Unprocessable entity
Example Request
curl -X GET "https://api.mergify.com/v1/repos/:owner/:repository/branches/:branch/merge-queue/settings" \
-H "Authorization: Bearer <token>"
List the pull requests nobody has queued #
/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.
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
The number of items in this page
The number of items per page
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
}
403 Forbidden
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`.
CI_ADMIN_ROLE_REQUIRED CI_ID_TOKEN_AUDIENCE_REFUSED CI_ID_TOKEN_EXCHANGE_NOT_ENABLED 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_SCOPES_TARGET_REFUSED CI_TRACES_UPLOAD_UNUSABLE CI_TRUST_POLICY_NAME_TAKEN COMMAND_RESTRICTED CONFIGURATION_BRANCH_REFUSED CONFIGURATION_INVALID CONFIGURATION_REFUSED_BY_REPOSITORY_RULES CONFIGURATION_SIGNED_COMMITS_REQUIRED DEFAULT_BRANCH_NOT_FOUND GITHUB_ACCOUNT_SUSPENDED GITHUB_APP_ACCESS_LOST GITHUB_RATE_LIMITED GITHUB_UPSTREAM_REQUEST_FORBIDDEN GITHUB_UPSTREAM_REQUEST_REJECTED GITHUB_UPSTREAM_UNAVAILABLE ID_TOKEN_KEY_ROTATION_REFUSED INTEGRATION_NOT_CONFIGURED IP_ALLOW_LIST_NOT_CONFIGURED MERGE_QUEUE_DISABLED MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN MERGE_QUEUE_SETTING_NOT_AVAILABLE NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PIPELINE_NAME_TAKEN PIPELINE_NOT_FOUND PIPELINE_RUN_NOT_FOUND PIPELINE_SECRETS_KEY_ALREADY_ADDED PIPELINE_SECRETS_KEY_IN_USE PIPELINE_SECRETS_KEY_LIMIT_REACHED PIPELINE_SECRETS_KEY_NOT_ACTIVE PIPELINE_SECRETS_KEY_NOT_FOUND PIPELINE_SECRETS_KEY_REPORTED PIPELINE_SECRET_LIMIT_REACHED PIPELINE_SECRET_NAME_TAKEN PIPELINE_SECRET_NOT_FOUND PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS PIPELINE_SECRET_VERSION_CHANGED PULL_REQUEST_ALREADY_QUEUED PULL_REQUEST_NOT_FOUND PULL_REQUEST_NOT_QUEUEABLE PULL_REQUEST_NOT_QUEUED RETRY_RULE_NOT_FOUND SAML_ENFORCEMENT_NOT_AUTHORIZED SETTING_MANAGED_BY_ENV SETUP_ALREADY_DONE SETUP_TOKEN_MISMATCH SUBSCRIPTION_API_UNAVAILABLE SUBSCRIPTION_INACTIVE SUBSCRIPTION_TOKEN_INVALID TEST_ALREADY_QUARANTINED TEST_BRANCH_NOT_TRACKED TEST_RETRY_NOT_CONFIGURED TEST_STATE_OVERLAPExample Response
{
"detail": "string",
"error_code": "CI_ADMIN_ROLE_REQUIRED",
"documentation_url": "string",
"extended_repository": "string"
}
Example Request
curl -X GET "https://api.mergify.com/v1/repos/:owner/:repository/merge-queue/unqueued-pulls" \
-H "Authorization: Bearer <token>"
Get the merge queue settings of an organization #
/orgs/{owner}/merge-queue/settings
Get what the organization sets of the merge queue settings of its repositories: a repository or a base branch may override each value
owner
string
required
The owner of the repository
min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$
200 Successful Response
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: fast-forward`, `queue_branch_merge_method: fast-forward` or `allow_queue_branch_edit`, or `merge_method: merge-batch` outside the `serial` 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`. `null` leaves it to the level above.
Example Response
{
"batch_pull_request": true
}
403 Forbidden
404 Not found
409 Conflict
422 Unprocessable entity
Example Request
curl -X GET "https://api.mergify.com/v1/orgs/:owner/merge-queue/settings" \
-H "Authorization: Bearer <token>"
Update the merge queue settings of an organization #
/orgs/{owner}/merge-queue/settings
Replace what the organization sets of the merge queue settings of its repositories. Each repository's merge queue applies them on its next pass. Requires the organization admin role.
owner
string
required
The owner of the repository
min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$
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: fast-forward`, `queue_branch_merge_method: fast-forward` or `allow_queue_branch_edit`, or `merge_method: merge-batch` outside the `serial` 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`. `null` leaves it to the level above.
200 Successful Response
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: fast-forward`, `queue_branch_merge_method: fast-forward` or `allow_queue_branch_edit`, or `merge_method: merge-batch` outside the `serial` 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`. `null` leaves it to the level above.
Example Response
{
"batch_pull_request": true
}
403 `MERGE_QUEUE_SETTING_NOT_AVAILABLE`: `batch_pull_request: false` is not available to this organization yet. Contact Mergify Support to have it enabled for your organization.
CI_ADMIN_ROLE_REQUIRED CI_ID_TOKEN_AUDIENCE_REFUSED CI_ID_TOKEN_EXCHANGE_NOT_ENABLED 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_SCOPES_TARGET_REFUSED CI_TRACES_UPLOAD_UNUSABLE CI_TRUST_POLICY_NAME_TAKEN COMMAND_RESTRICTED CONFIGURATION_BRANCH_REFUSED CONFIGURATION_INVALID CONFIGURATION_REFUSED_BY_REPOSITORY_RULES CONFIGURATION_SIGNED_COMMITS_REQUIRED DEFAULT_BRANCH_NOT_FOUND GITHUB_ACCOUNT_SUSPENDED GITHUB_APP_ACCESS_LOST GITHUB_RATE_LIMITED GITHUB_UPSTREAM_REQUEST_FORBIDDEN GITHUB_UPSTREAM_REQUEST_REJECTED GITHUB_UPSTREAM_UNAVAILABLE ID_TOKEN_KEY_ROTATION_REFUSED INTEGRATION_NOT_CONFIGURED IP_ALLOW_LIST_NOT_CONFIGURED MERGE_QUEUE_DISABLED MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN MERGE_QUEUE_SETTING_NOT_AVAILABLE NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PIPELINE_NAME_TAKEN PIPELINE_NOT_FOUND PIPELINE_RUN_NOT_FOUND PIPELINE_SECRETS_KEY_ALREADY_ADDED PIPELINE_SECRETS_KEY_IN_USE PIPELINE_SECRETS_KEY_LIMIT_REACHED PIPELINE_SECRETS_KEY_NOT_ACTIVE PIPELINE_SECRETS_KEY_NOT_FOUND PIPELINE_SECRETS_KEY_REPORTED PIPELINE_SECRET_LIMIT_REACHED PIPELINE_SECRET_NAME_TAKEN PIPELINE_SECRET_NOT_FOUND PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS PIPELINE_SECRET_VERSION_CHANGED PULL_REQUEST_ALREADY_QUEUED PULL_REQUEST_NOT_FOUND PULL_REQUEST_NOT_QUEUEABLE PULL_REQUEST_NOT_QUEUED RETRY_RULE_NOT_FOUND SAML_ENFORCEMENT_NOT_AUTHORIZED SETTING_MANAGED_BY_ENV SETUP_ALREADY_DONE SETUP_TOKEN_MISMATCH SUBSCRIPTION_API_UNAVAILABLE SUBSCRIPTION_INACTIVE SUBSCRIPTION_TOKEN_INVALID TEST_ALREADY_QUARANTINED TEST_BRANCH_NOT_TRACKED TEST_RETRY_NOT_CONFIGURED TEST_STATE_OVERLAPExample Response
{
"detail": "string",
"error_code": "CI_ADMIN_ROLE_REQUIRED",
"documentation_url": "string"
}
404 Not found
409 Conflict
422 Unprocessable entity
Example Request
curl -X PUT "https://api.mergify.com/v1/orgs/:owner/merge-queue/settings" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"batch_pull_request": true
}'
Reset the merge queue settings of an organization #
/orgs/{owner}/merge-queue/settings
Unset every merge queue setting of the organization, which its repositories then take from the defaults. Requires the organization admin role.
owner
string
required
The owner of the repository
min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$
204 Successful Response
403 Forbidden
404 Not found
409 Conflict
422 Unprocessable entity
Example Request
curl -X DELETE "https://api.mergify.com/v1/orgs/:owner/merge-queue/settings" \
-H "Authorization: Bearer <token>"
Was this page helpful?
Thanks for your feedback!