Documentation
Data Definitions
This section describes how each data point is calculated. Metrics are calculated using all repositories that you have permitted the Github App access to.
-
PR Merge Rate:
The total number of pull requests merged for the given timeframe divided by the total number of weekdays in the given timeframe.
- Pull requests merged into default and non-default branches are included.
- Commits pushed directly to main/master are excluded.
- Saturdays and Sundays are excluded.
-
PR Comment Rate:
The total number of comments issued divided by the number of opened pull requests for the given timeframe. This metric describes the average number of review comments a pull request will receive.
-
Average PR Size:
The average number of lines of code changed for pull requests opened during the given timeframe.
- Lines of code is the sum of lines added and lines removed. If a pull request's diff is +2 -4, lines of code is 6.
- Pull requests with lines of code greater than 2500 are excluded.
-
PR Review Breakdown:
The total number of pull requests reviews issued by review type: approval, changes requested, or commented.
- Dismissed PR reviews are included.
-
PR Open-to-approval Time:
The average amount of time that pull requests spend waiting for approval to be merged.
- The number of approvals required for a PR to be merged is configurable.
- Example: Pull request A was opened at 8am and received it's first approval review at 8:45am. Pull request A's open-to-approval time is 45 minutes.
-
PR Open-to-merge Time:
The average amount of time that pull requests remain in the 'open' state before being merged.
- Pull requests that are closed (instead of merged) are excluded.
- Example: Pull request A was open for 60 minutes and pull request B was open for 30 minutes, avg. open-to-merge time is 45 minutes.
-
PRs Opened:
The total number of pull requests opened in the given timeframe.
- Pull requests to default and non-default branches are included.
-
PRs Merged:
The total number of pull requests merged in the given timeframe.
- Pull requests to default and non-default branches are included.
-
PR Reviews:
The total number of pull request reviews submitted by the developer in the given timeframe.
- Dismissed PR reviews are included.
-
PR Comments:
The total number of pull request comments submitted by the developer in the given timeframe.
- Deleted PR comments are included.
Webhooks
The Github App works by consuming webhooks from Github. In the event that Github has an outage impacting webhooks, and is unable to deliver webhooks, data for any Github activity that occurred during the duration of the outage will also be missing from GitInsights.
Historic Data
The Github App will begin consuming webhooks to build metrics going forward from the time at which the Github App is installed. The Github App will also fetch metrics/activity for the prior 30 days. One caveat: historic data (pull requests and associated reviews/comments) will only be fetched for the default branches of your repositories.
If you notice any inaccuracies or have any questions, please leave feedback in the app or contact me directly at [email protected].