Pull Request Metrics
Pull request metrics provide insights into the volume, size, productivity, and interactions of pull requests in your repositories.Available Metrics
string
Number of pull requests
string
Size of pull requests (additions + deletions)
string
Percentage of PRs that received at least one review
string
Code complexity score of pull requests
string
Number of unique contributors
string
Number of reviews submitted
string
Number of review interactions
string
Number of review rounds per PR
string
Average number of reviewers per PR
string
Number of distinct reviewers in the period
string
Rate of reviews that requested changes
string
Comment interaction count
string
Number of comments
string
Average number of comments per PR
string
Commit interaction count
string
Number of commits
Pull Requests Count Metric
This endpoint provides the count of pull requests based on specified filters.Pull Requests Size Metric
This endpoint provides information about the size of pull requests.Complexity Score Metric
This endpoint provides the complexity score of pull requests, which measures code complexity introduced per PR.Parameter Notes
string
For pull request metrics, the following date fields are available:
created_at: When the PR was createdmerged_at: When the PR was mergedclosed_at: When the PR was closed
string
Required for non-count metrics. Accepted values:
SUM, MAX, MIN, AVG.
Count-based metrics (pull-requests-count, reviews-count, comments-count, commits-count, review-interactions-count, comment-interactions-count, commit-interactions-count, review-rounds, active-reviewers, reviewers-per-pr, review-rate, changes-requested-rate, comments-per-pr, contributors-count) do not require an aggregation.object
Applicable filters for pull request metrics:
repositories: Array of{"repository_name": "..."}objectsmember: Filter by author merged user IDsteam: Filter by team IDssquad_ids: Filter by squad IDssquad_levels: Filter by squad hierarchy levelmanager_ids: Filter by manager user IDsdepartments: Filter by department namespr_states: PR states —open,closed,mergedpr_categories: PR category classificationspr_ids: Filter by specific PR IDssources: VCS source —github,gitlab,bitbucketpull_requests_search_term: Full-text search across PR title, description, body, summary, and categorylocations: Filter by employee locationlevels: Filter by employee levelreview_hour_of_day: Filter reviews by hour of day (0–23) — forreviews-by-time-of-dayreview_rounds_bucket: Filter by review rounds bucket — forreview-rounds
Common Use Cases
- Monitor PR Volume: Track the number of PRs created over time
- Identify Large PRs: Find PRs that are above a certain size threshold using
metric_min_value - Analyze Review Culture: Track review rate and comments per PR
- Assess productivity Trends: Monitor if code productivity is increasing or decreasing over time
- Team Comparison: Compare PR metrics across different teams or repositories

