PR Maturity Metric
PR Maturity measures the proportion of a pull request that remained unchanged after submission, indicating how stable it was during the review process.
Definition
PR Maturity measures how stable and well-prepared a Pull Request (PR) was at the time it was submitted for review.
It reflects the proportion of the PR that remained unchanged after initial submission.
Only merged PRs larger than 10 lines of code are included in this metric.

How the Metric Is Calculated
PR Maturity compares the state of the branch at two points in time:
- At PR creation – when the PR was initially issued
- At PR closure – after additional changes were made before merge
Definitions
- Current PR Size = total additions + deletions in the PR
- Changes After PR Issued = additions + deletions made after the PR was published
Formula
PR Maturity = round(max(0.1, 1 − (Changes After PR Issued ÷ Current PR Size)), 2)
Where:
- The result is rounded to two decimal places
- The metric is constrained to a minimum value of 0.1 (10%)
- Only PRs larger than 10 lines are included
Example
- Current PR Size = 100 lines
- Changes After PR Issued = 20 lines
PR Maturity =
round(max(0.1, 1 − (20 ÷ 100)), 2)
= round(0.8, 2)
= 0.80 (80%)

How the Metric Is Displayed in the Dashboard
The metric card displays two types of values:
1. Headline Value (e.g., 78.2% Avg maturity ratio)
The large percentage at the top represents: The weighted average PR Maturity across all eligible merged PRs in the selected time range
This value is calculated using the maturity of all included PRs — not by averaging daily percentages.
2. Time-Based Values in the Chart
The line chart shows PR Maturity aggregated per time bucket (for example, daily).
Each point represents: The weighted average PR Maturity of eligible merged PRs within that specific time bucket
Clicking a point displays:
- The PR Maturity percentage for that date
- The maturity ratio for that period
Daily values are calculated independently per bucket and do not average to produce the headline value.

Why This Metric Is Useful
PR Maturity provides visibility into:
- How much revision was required after initial submission
- The readiness of PRs before review
- The effectiveness of self-review practices
High PR Maturity generally indicates:
- Well-prepared submissions
- Fewer post-submission revisions
- Stable review cycles
Low PR Maturity may indicate:
- Significant rework after submission
- Unclear requirements
- Incomplete testing or rushed development
However, extremely high maturity may also correlate with shallow review processes if minimal feedback is provided.

How to Interpret PR Maturity
PR Maturity should be evaluated alongside:
- Rework
- Review Depth
- PR Size
- Time to Review
It measures post-submission stability, not code quality.
As general guidance:
- Consistently high maturity suggests stable submission practices.
- Consistently low maturity may indicate workflow inefficiencies or unclear requirements.
Context matters — development phase, review rigor, and team maturity all influence this metric.

Data Sources
Derived from:
- Git branch diff comparisons
- Pull Request creation timestamps
- Pull Request merge timestamps
- Repository diff data

Limitations
- Does not evaluate review quality.
- Small PRs (<10 lines) are excluded.
- Large refactors before merge may reduce maturity even if intentional.
- The minimum floor value (10%) prevents extreme distortion but may mask rare edge cases.
- Changes made due to legitimate review improvements will lower maturity.
PR Maturity reflects change stability, not overall code quality.

Stakeholder Use Cases
Engineering Managers
- Monitor submission readiness trends.
- Detect workflow instability.
- Identify teams requiring improved pre-review practices.
Team Leads
- Coach developers on self-review standards.
- Reduce excessive post-submission iteration.
Developers
- Improve first-pass submission quality.
- Minimize avoidable revisions before merge.
Product and Delivery Leadership
- Understand review cycle stability.
- Detect potential inefficiencies affecting delivery timelines.
How did we do?
New Code Metric
PR Size Metric