How is DevRank calculated?

The following sections are technical. If you choose to skip it, you can just think of DevRank as a score derived from a version of Google's PageRank, but applied to the network of GitHub contributors 🙂

Your DevRank score is calculated from each GitHub repo you’ve contributed to. The score for each repo is itself composed of

A PageRank scoreThe Network Reputation+a small correction The PR bonuses \underbrace{\text{A PageRank score}}_\text{\bf{The Network Reputation}} + \underbrace{\text{a small correction}}_\text{\bf{ The PR bonuses}}

⭐️ The Network reputation

The Network Reputation is the main and largest component of the score. It's an estimate of the importance of a repo, divided amongst its contributors.

We begin by calculating the PageRank score of each user based on the entire network of contributors, stargazers, and repo dependencies. Users with a high PageRank score who star or import a repo contribute significantly to the repo's Network Reputation; conversely those with a low score may not contribute anything at all (think bots and spam accounts).

The Network Reputation of the repo is distributed amongst its contributors proportionally to how much of the codebase each contributor has written (measured in commits). For example, the average stargazer generates 10 DevRank points for a repo, and a user who contributed 10% of its commits will receive +1 DevRank at the time of starring. Hence a repo with few stargazers of significance and many contributors will result in a low score for those involved.

🍬 The PR bonuses

PR bonuses as a small, but important component in DevRank. PR bonuses are a reward for passing a repository's peer review process. If the repository has n stars at the time of the contribution, the PR bonus will be int(log10(n)), so the PR bonus will be a number between 1 and 5. The bonus is awarded as long as:

  1. The PR is opened in a repo that is not owned by the user.

  2. The user who merges the PR must be different to the one who opened it.

The PR bonus is especially designed to reward developers for the effort required to contribute to large difficult-to-navigate repos such as PyTorch or React.

Last updated