Monitor Code Health with Repository Insights

Monitor Code Health with Repository Insights

Performance metrics or KPIs for developers can be a monkey’s paw. You’ll often get exactly what you measure, so be careful what you wish for.

Through our code review across many different teams, we’ve seen telltale signs of toxic coding practices as a result of KPI initiatives introduced with the best of intentions.

If you optimize for added lines of code, then you might unintentionally encourage bloat or redundancy for the sake of writing more code.

Establishing the right metrics to monitor code health is really hard, but it’s important to track changes over time in order to see emerging trends or outliers that can be drilled into further.

Our new Repository Insights dashboard displays clean, simple visualizations for several key metrics at-a-glance: open pull request statuses, average pull request lifespan, daily trends across average pull request lifespan, comments on pull requests, and contribution volume.

We’re working to highlight key metrics and trends to help development teams most meaningfully optimize their development lifecycles.

images/repository-insights.gif

Open Pull Request Statuses
A snapshot of your project’s open pull requests and how many were completed by PullRequest.

Average Pull Request Lifespan
The lifespan of your 20 most recent pull requests benchmarked against your project’s 30-day time-to-merge average.

Why it matters: Look for patterns in outliers, like the commit size or complexity of the pull request, or the working relationship between the author and reviewer. The larger the change, the easier it is to miss something, and you may find your team is reluctant to tackle larger CLs. Or maybe two team members are struggling to work together to close pull requests quickly, and could benefit from an intermediary. Our network of on-demand reviewers provides impartial code review that’s free from office politics.

Average Pull Request Lifespan: Daily Trend
The 3 to 28-day rolling average and median lifespans of your project’s pull requests.

Why it matters: Ideally, your pull request lifespan is consistently within your targets, but if it’s taking longer to close or merge pull requests over time, then your development team might benefit from some additional support. PullRequest’s reviewers scale with your team, and can help you reprioritize your team’s time spent on shipping new features versus code maintenance.

Comments on Pull Requests
Collaboration trends at the code review level from both PullRequest reviewers and all collaborators in aggregate.

Contribution Volume
The volume of shipped and refactored code across the last 30 days.

Repository Insights is available today for customers on GitHub, with dashboard support for GitLab, Bitbucket, and self-hosted solutions coming soon, so stay tuned.

At PullRequest, we believe it’s important for development teams to make data-driven decisions, and to make them based on the best information available. The Repository Insights dashboard is one more tool we’re able to provide to development teams, and we’ll continue to share code quality best practices on the PullRequest blog.


About PullRequest

HackerOne PullRequest is a platform for code review, built for teams of all sizes. We have a network of expert engineers enhanced by AI, to help you ship secure code, faster.

Learn more about PullRequest

Dan Mateer headshot
by Dan Mateer

January 22, 2019