Queues
Configure and inspect merge queues for your repositories.
Get merge queues configuration #
/repos/{owner}/{repository}/queues/configuration
Get the list of all merge queues configuration sorted by processing order
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
{
"configuration": [
{
"name": "string",
"config": {}
}
]
}
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`.
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 IP_ALLOW_LIST_NOT_CONFIGURED NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PIPELINE_NAME_TAKEN PIPELINE_NOT_FOUND PIPELINE_RUN_NOT_FOUND 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_RETRY_NOT_CONFIGURED TEST_STATE_OVERLAPExample Response
{
"detail": "string",
"error_code": "CONFIGURATION_BRANCH_REFUSED",
"documentation_url": "string",
"extended_repository": "string"
}
Example Request
curl -X GET "https://api.mergify.com/v1/repos/:owner/:repository/queues/configuration" \
-H "Authorization: Bearer <token>"
Pause the merge queue #
/repos/{owner}/{repository}/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 queue pause
200 Successful Response
Example Response
{
"queue_pause": [
{
"reason": "string",
"pause_date": "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`.
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 IP_ALLOW_LIST_NOT_CONFIGURED NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PIPELINE_NAME_TAKEN PIPELINE_NOT_FOUND PIPELINE_RUN_NOT_FOUND 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_RETRY_NOT_CONFIGURED TEST_STATE_OVERLAPExample Response
{
"detail": "string",
"error_code": "CONFIGURATION_BRANCH_REFUSED",
"documentation_url": "string",
"extended_repository": "string"
}
Example Request
curl -X PUT "https://api.mergify.com/v1/repos/:owner/:repository/queue/pause" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"reason": "string"
}'
Unpause merge queue #
/repos/{owner}/{repository}/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`.
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 IP_ALLOW_LIST_NOT_CONFIGURED NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PIPELINE_NAME_TAKEN PIPELINE_NOT_FOUND PIPELINE_RUN_NOT_FOUND 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_RETRY_NOT_CONFIGURED TEST_STATE_OVERLAPExample Response
{
"detail": "string",
"error_code": "CONFIGURATION_BRANCH_REFUSED",
"documentation_url": "string",
"extended_repository": "string"
}
Example Request
curl -X DELETE "https://api.mergify.com/v1/repos/:owner/:repository/queue/pause" \
-H "Authorization: Bearer <token>"
Get queue pause data #
/repos/{owner}/{repository}/queue/pause
Checks if the merge queue is paused and get the queue 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
Example Response
{
"queue_pause": [
{
"reason": "string",
"pause_date": "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`.
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 IP_ALLOW_LIST_NOT_CONFIGURED NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PIPELINE_NAME_TAKEN PIPELINE_NOT_FOUND PIPELINE_RUN_NOT_FOUND 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_RETRY_NOT_CONFIGURED TEST_STATE_OVERLAPExample Response
{
"detail": "string",
"error_code": "CONFIGURATION_BRANCH_REFUSED",
"documentation_url": "string",
"extended_repository": "string"
}
Example Request
curl -X GET "https://api.mergify.com/v1/repos/:owner/:repository/queue/pause" \
-H "Authorization: Bearer <token>"
Unpause merge queue #
/repos/{owner}/{repository}/queue/pause/delete
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`.
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 IP_ALLOW_LIST_NOT_CONFIGURED NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PIPELINE_NAME_TAKEN PIPELINE_NOT_FOUND PIPELINE_RUN_NOT_FOUND 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_RETRY_NOT_CONFIGURED TEST_STATE_OVERLAPExample Response
{
"detail": "string",
"error_code": "CONFIGURATION_BRANCH_REFUSED",
"documentation_url": "string",
"extended_repository": "string"
}
Example Request
curl -X POST "https://api.mergify.com/v1/repos/:owner/:repository/queue/pause/delete" \
-H "Authorization: Bearer <token>"
Get merge queues #
/repos/{owner}/{repository}/queues
Get the list of pull requests queued in a merge queue of a 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\-]+$
200 Successful Response
Example Response
{
"queues": [
{
"branch": {
"name": "main"
},
"pull_requests": [
{
"number": 5678,
"position": 1,
"priority": 100,
"effective_priority": 100,
"priority_alias": "low",
"partition_name": "__default__",
"queue_rule": {
"name": "default",
"config": {
"priority": 100,
"batch_size": 1,
"batch_max_wait_time": 0,
"allow_inplace_checks": true,
"allow_queue_branch_edit": false,
"checks_timeout": 60,
"draft_bot_account": "",
"queue_branch_prefix": "mergify/merge-queue/",
"queue_branch_merge_method": "fast-forward",
"batch_max_failure_resolution_attempts": 10,
"commit_message_template": "",
"merge_bot_account": "",
"merge_method": "merge",
"update_bot_account": "",
"update_method": "rebase"
}
},
"speculative_check_pull_request": {
"in_place": true,
"number": 5678,
"started_at": "2021-10-14T14:19:12+00:00",
"ended_at": "2021-10-14T15:00:42+00:00",
"checks": [],
"evaluated_conditions": "",
"state": "success"
},
"mergeability_check": {
"check_type": "in_place",
"pull_request_number": 5678,
"started_at": "2021-10-14T14:19:12+00:00",
"ended_at": "2021-10-14T15:00:42+00:00",
"state": "success"
},
"queued_at": "2021-10-14T14:19:12+00:00",
"estimated_time_of_merge": "2021-10-14T15:19:12+00:00"
},
{
"number": 4242,
"position": 1,
"priority": 100,
"effective_priority": 100,
"priority_alias": "low",
"partition_name": "__default__",
"queue_rule": {
"name": "default",
"config": {
"priority": 100,
"batch_size": 1,
"batch_max_wait_time": 0,
"allow_inplace_checks": true,
"allow_queue_branch_edit": false,
"checks_timeout": 60,
"draft_bot_account": "",
"queue_branch_prefix": "mergify/merge-queue/",
"queue_branch_merge_method": "fast-forward",
"batch_max_failure_resolution_attempts": 10,
"commit_message_template": "",
"merge_bot_account": "",
"merge_method": "merge",
"update_bot_account": "",
"update_method": "rebase"
}
},
"speculative_check_pull_request": {
"in_place": false,
"number": 7899,
"started_at": "2021-10-14T14:19:12+00:00",
"ended_at": "2021-10-14T15:00:42+00:00",
"checks": [],
"evaluated_conditions": "",
"state": "success"
},
"mergeability_check": {
"check_type": "draft_pr",
"pull_request_number": 7899,
"started_at": "2021-10-14T14:19:12+00:00",
"ended_at": "2021-10-14T15:00:42+00:00",
"state": "success"
},
"queued_at": "2021-10-14T14:19:12+00:00",
"estimated_time_of_merge": "2021-10-14T15:19:12+00:00"
}
]
}
]
}
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`.
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 IP_ALLOW_LIST_NOT_CONFIGURED NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PIPELINE_NAME_TAKEN PIPELINE_NOT_FOUND PIPELINE_RUN_NOT_FOUND 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_RETRY_NOT_CONFIGURED TEST_STATE_OVERLAPExample Response
{
"detail": "string",
"error_code": "CONFIGURATION_BRANCH_REFUSED",
"documentation_url": "string",
"extended_repository": "string"
}
Example Request
curl -X GET "https://api.mergify.com/v1/repos/:owner/:repository/queues" \
-H "Authorization: Bearer <token>"
Get the base refs in the repository #
/repos/{owner}/{repository}/queues/branches
Retrieve a list of base refs branches affected by queue activity
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\-]+$
start_at
string <date-time>
Get the stats from this date: an ISO 8601 datetime with a UTC offset (e.g. `2024-01-01T00:00:00Z`); a Unix timestamp or a datetime without an offset is refused. Defaults to 1 day before `end_at`.
end_at
string <date-time>
Get the stats until this date: an ISO 8601 datetime with a UTC offset (e.g. `2024-01-01T00:00:00Z`); a Unix timestamp or a datetime without an offset is refused. Defaults to now.
200 Successful Response
Example Response
{
"base_refs": [
"string"
]
}
403 Forbidden
404 Not found
409 Conflict
422 Unprocessable entity
Example Request
curl -X GET "https://api.mergify.com/v1/repos/:owner/:repository/queues/branches" \
-H "Authorization: Bearer <token>"
Was this page helpful?
Thanks for your feedback!