Pull Request Statistics

Repository pull request statistics show you various interesting statistics about your pull request usage. To get there, you can either use the top-level menu Pull Request Analytics > Statistics


or on the repository level, there is a new button the app provides which after clicking shows you various statistics:

 

Pull Request Distribution

The PR distribution statistics shows you the state of pull requests at a given point in time:



Pull Request Cycle Time

The PR cycle time statistic shows the time between open and either merge or decline. This highlights bottlenecks where pull requests were open for a long period of time, often leading to the situation where merge conflicts are difficult to avoid and overcome:



Pull Request Average Lines of Code

The PR average lines of code statistics shows the sum of added and removed lines of code in a pull request. As small pull requests have various advantages, such as ease of review, reduced potential for conflicts, etc., this statistic helps your team to locate and optimize large pull requests.

 


Pull Time to Open

The PR time to open statistics shows the time elapsed between a user's first commit to a branch and opening a pull request for that branch. This allows teams to visualize the time to open period and see the detail of each pull request. Decreasing this time period allows devs to receive feedback earlier in the process and allows more time for collaboration and iteration in the pull request.

Time thresholds which you see in the statistics graphs (as a dotted black line) are fully configurable.

 

Configuring Thresholds

For the statistics, you can configure thresholds which you see in the graphs as a dotted line. To configure them, go to Repository settings > Pull Request Analytics → Threshold settings