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
owner
string
required
The owner of the repository
min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$
repository
string
required
The name of the repository
min length: 1 · pattern: ^[\w\-\.]+$
200 Successful Response
Example Response
{
"configuration": [
{
"name": "string",
"config": {}
}
]
}
403 Forbidden
404 Not found
409 Conflict
422 The configuration file is invalid.
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
owner
string
required
The owner of the repository
min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$
repository
string
required
The name of the repository
min length: 1 · pattern: ^[\w\-\.]+$
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 The pause does not exist
409 Conflict
422 Unprocessable entity
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
owner
string
required
The owner of the repository
min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$
repository
string
required
The name of the repository
min length: 1 · pattern: ^[\w\-\.]+$
204 Successful Response
403 Forbidden
404 The merge queue is not currently paused on this repository
409 Conflict
422 Unprocessable entity
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
owner
string
required
The owner of the repository
min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$
repository
string
required
The name of the repository
min length: 1 · pattern: ^[\w\-\.]+$
200 Successful Response
Example Response
{
"queue_pause": [
{
"reason": "string",
"pause_date": "2024-01-15T09:00:00Z"
}
]
}
403 Forbidden
404 The merge queue is not currently paused on this repository
409 Conflict
422 Unprocessable entity
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
owner
string
required
The owner of the repository
min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$
repository
string
required
The name of the repository
min length: 1 · pattern: ^[\w\-\.]+$
204 Successful Response
403 Forbidden
404 The merge queue is not currently paused on this repository
409 Conflict
422 Unprocessable entity
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
owner
string
required
The owner of the repository
min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$
repository
string
required
The name of the repository
min length: 1 · pattern: ^[\w\-\.]+$
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 Unprocessable entity
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
owner
string
required
The owner of the repository
min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$
repository
string
required
The name of the repository
min length: 1 · pattern: ^[\w\-\.]+$
start_at
string <date-time>
Get the stats until this date, default 1 day before end_at
end_at
string <date-time>
Get the stats from this date, default 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!