Stacks
Stacks endpoints for the Mergify API.
Get adoption summary metrics for Stacks
/repos/{owner}/stacks/summary
Returns counts and weekly trend for Mergify Stacks across the org's repositories over a time window (default 30 days, max 90).
owner
string
required
The owner of the repository
min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$
days
integer
min: 1 · max: 90
200 Successful Response
Currently open stacks across the org
Total PRs that belong to a stack in the window
Repositories with at least one stack in the window
Percent of merged PRs in the window that came from a stack
Example Response
{
"active_stacks": 0,
"stack_prs_in_window": 0,
"repos_with_stacks_in_window": 0,
"percent_merged_from_stack": 0,
"weekly_buckets": [
{
"week_start": "2024-01-15",
"stacks_created": 0
}
]
}
403 Forbidden
404 Not found
409 Conflict
422 Unprocessable entity
Example Request
curl -X GET "https://api.mergify.com/v1/repos/:owner/stacks/summary" \
-H "Authorization: Bearer <token>"
List recent stacks across the org's repositories
/repos/{owner}/stacks/recent
Returns clustered stacks for the org over a time window, newest first. Each entry includes the root PR plus all PRs in the stack with links to GitHub.
owner
string
required
The owner of the repository
min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$
repo
string[]
days
integer
min: 1 · max: 90
per_page
integer
min: 1 · max: 100
cursor
integer
min: 0
200 Successful Response
Offset of the next page (pass back as the `cursor` query param); null if there are no more pages.
Example Response
{
"stacks": [
{
"repo": "string",
"root_pr": {},
"pr_count": 0,
"state": "string",
"created_at": "2024-01-15T09:00:00Z",
"updated_at": "2024-01-15T09:00:00Z",
"prs": null
}
],
"next_cursor": 0
}
403 Forbidden
404 Not found
409 Conflict
422 Unprocessable entity
Example Request
curl -X GET "https://api.mergify.com/v1/repos/:owner/stacks/recent" \
-H "Authorization: Bearer <token>"
Was this page helpful?
Thanks for your feedback!