The endpoint GET /repos/{owner}/{repository}/stats/failure_rate returns the failure rate of pull requests in the merge queue, broken down by time intervals.
Each interval includes:
- total: the number of pull requests that left the queue
- failures: the number of pull requests that were not merged
- failure_rate: the ratio of failures to total (between 0.0 and 1.0) Results are grouped by base branch, partition, queue, and priority rule, making it easy to identify which queues or branches have the highest failure rates.
Filtering
Section titled FilteringYou can filter results using query parameters:
base_ref— filter by target branch (e.g.,main)partition_name— filter by partitionqueue_name— filter by queue namepriority_rule_name— filter by priority rule
Use cases
Section titled Use cases- Monitor merge queue health over time
- Identify queues or branches with unusually high failure rates
- Track the impact of CI or configuration changes on merge success