1.1.0 • Published 3 years ago

@jessitron/reporank v1.1.0

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

Reporank

A command-line tool for retrieving top-ranked repos for an organization.

> npm install -g @jessitron/reporank
> reporank --org systemsthinking-dev stars

Top 5 starred repositories in systemsthinking-dev:
Rank Repository name               Stars
---- ----------------------------- -----
  1. systemsthinking-dev.github.io  1404
  2. featureclicker                  902
  3. explore-deps                    807
  4. bananapants                     738
  5. lizardbreath                     88

Business case

Open source projects succeed based on community engagement. It's all about how many people care, how many people want to contribute, and how many of those succeed at contributing.

These are the behaviors we want our product teams to aim for. Therefore, we want to make it very easy for developers of our open source products to see how they're doing on engagement.

Since many developers would rather run a quick command line than look at yet another dashboard, this tool brings engagement statistics right to them.

By including only the top-ranked repositories in our organization, we encourage 'friendly' competition between teams. This way we they know they're being stack-ranked, and can fight accordingly.*

Features

Reporank has four spectacular subcommands to give you the rankings you need!

stars

The repositories with the most stars. People star a repository when they find it important, want to hear about updates, and maybe want to come back. This indicates community interest. It is a leading indicator, often a precursor to deeper engagement.

reporank --org microsoft stars

forks

The repositories with the most forks. People fork a GitHub repository when they want to make changes to the code or documentation. This is a necessary step to contributing. Every fork is a sign that someone cares enough to try the code for themselves.

> reporank --org microsoft forks

Top 5 forked repositories in microsoft:
Rank Repository name           Forks
---- ------------------------- -----
  1. vscode                    10404
  2. typescript                 8902
  3. Windows-universal-samples  7707
  4. terminal                    738
  5. sql-server-samples           88

prs

Pull Requests! This is what we're after. Every pull request means someone forked the repository, made a change, and offered it back to us. This is not the last step to contributing -- most pull requests are not immediately mergeable -- but it is the biggest one.

We count pull requests over repositories updated within the last month.

Rank repositories by total PRs in the time window:

> reporank --org microsoft prs
Checking 1179 repositories updated since 2021-03-22...

Top 5 pull-requested repositories in microsoft
Rank Repository name             PRs
---- ------------------------- -----
  1. typescript                13021
  2. vscode                     9224
  3. BeanSpy                    7707
  4. terminal                   2187
  5. sql-server-samples         1088

Note: If you'd rather hear the count of unique contributors instead of a PR count, star this issue.

Note: If you'd rather hear about PRs in a time period instead of all PRs ever, star this issue.

contribution-percentage

How many people who fork the repository succeed in making a pull request? This measures the barriers between considering making a contribution, and actually offering one. Bring this up by making your processes and code simpler and smoother -- bring those interested people onboard!

This is a calculation of all PRs ever divided by all forks ever, rounded to two significant figures and expressed as a percentage.

> reporank --org microsoft contribution-percentage

Checking 1179 repositories updated since 2021-03-22...
Calculating the ratio of PRs:Forks...

Top 5 Contribution Percentage repositories in microsoft
Rank Repository name             PRs
---- ------------------------- -----
  1. typescript                1200%
  2. vscode                     910%
  3. BeanSpy                    230%
  4. terminal                    96%
  5. sql-server-samples        0.24%

Note: if you would rather compare the forks to number of contributors, instead of PR count, we agree. Star this issue to tell us we should work on it.

Install

Get this fantastic tool from npm with:

npm install -g @jessitron/reporank

Usage

Tell it which org you care about, optionally how many repos you want to see, and which ranking you want:

reporank --org <github-organization> [-n <number-of-repos>] [stars | forks | prs | contribution-percentage]

The number of repositories defaults to 5.

Your GitHub organization can also be supplied in a GITHUB_ORGANIZATION environment variable, and then --org becomes optional.

If you want to see private repositories, then please vote up this ticket.

Contributions

Issues and pull requests are welcome! We're all about engagement, after all!

See CONTRIBUTING.md for community guidelines.


  • In case the sarcasm doesn't come through: this was not the strategy I would choose.