DEV Community

Cover image for How I measure collaboration from GitHub reviews
4thwithme
4thwithme

Posted on

How I measure collaboration from GitHub reviews

"Good team player" is in almost every review. It is nice. It also says nothing. I wanted to see collaboration in data, so I looked at what GitHub already knows about my reviews.

Four numbers that tell a lot

1. Reviews per own PR. Take the reviews you gave to other people's PRs. Divide by the PRs you merged. I call it review load. Above 1 means you give more reviews than you take. Below 1 for a long time means the team carries your PRs.

2. Review outcomes. Every review on GitHub is one of three: approve, comment, request changes. Look at the split. If it is 100% approvals, the reviews are maybe a click on a button. A healthy mix has comments and some change requests.

3. Review response time. How fast you answer when someone asks you for a review. People remember who unblocks them.

4. Repos you review in. If you review only in your own repo, you help your own team. If you review in 8 repos, you help more people.

Collaboration record and review outcomes

How to get these numbers

You can count them with the GitHub GraphQL API: contributionsCollection gives your pullRequestReviewContributions, and each review has a state (APPROVED, COMMENTED, CHANGES_REQUESTED).

Review load

What it does not say

A low number is a question, not a verdict. Maybe you paired a lot. Maybe your team reviews in calls. Use the numbers to start the talk, not to end it.

The tool

I built ShowOffer to do this for me: it reads your GitHub in the browser and draws these widgets, next to the period before. The images show sample data, Jordan Vale is a fictional person. It is free and read-only: https://showoffer.tech

Top comments (0)