Overview
The RepoDORAMetrics module leverages GitHub’s GraphQL API to calculate essential DevOps performance metrics for a single repository. By using bulk, paginated queries and a caching layer, it efficiently gathers pull request and incident data and produces structured time-series results for each metric.
Authentication & Permissions
-
GitHub App Installation Token
Access token with the following permissions are required:
- Contents: Read
- Pull requests: Read
- Metadata: Read
-
Or Personal Access Token (PAT)
If you prefer a PAT, it needs these scopes:
repo
(full control of private repos, or at minimum repo:status
, repo_deployment
, public_repo
)
read:org
(if you’re querying organization-level data)
Metrics
Deployment Frequency
- Total number of pull requests merged into
main
within the selected date range.
Lead Time for Changes
- Average time elapsed between the first commit on a pull request and its merge.
Change Failure Rate
- Proportion of merged pull requests that failed status checks or required rollbacks.
Mean Time to Recovery (MTTR)
- Average duration to resolve issues labeled “incident.”
First Review Time
- Average time from pull request creation to the first review comment.
First Approval Time
- Average time from pull request creation to its first approval.
First-to-Last Approval Time
- Average interval between the first and last approvals on a pull request.
Last Approval-to-Merge Time
- Average time from the final approval to the merge event.
Time to Open
- Average time between the earliest commit in a pull request branch and the pull request’s creation. Negative intervals are treated as zero.
Time to Merge
- Average duration from pull request creation to its merge.