DEV Community

Cover image for How deep are your code reviews? Three numbers from GitHub
4thwithme
4thwithme

Posted on

How deep are your code reviews? Three numbers from GitHub

A code review can be a real read or one click on Approve. Most stats count both as one review. These three numbers show the difference.

Comments per review and comments per PR

1. Comments per review

Count the inline comments in the reviews you gave. Divide by the number of reviews.

Then count the approvals with no comment.

Comments per review

No comment on a 5-line fix is fine. No comment on a big PR is a reason to ask why.

2. Comments per PR

How much discussion your own PRs get. Very low: maybe nobody reads them. Very high: maybe the PRs are too big or not clear.

3. Resolved threads

Resolved review threads on your PRs, against all threads. It shows if feedback gets an answer. Some teams never press Resolve, so compare with your own past, not with other people.

Resolved threads

How to get it

The GraphQL API gives reviews { comments { totalCount } state } per PR and reviewThreads { isResolved }. Walk your merged PRs and the reviews you gave.

The tool

ShowOffer counts these three numbers for you from your GitHub account. The images show sample data, Jordan Vale is a fictional person. https://showoffer.tech

Top comments (0)