node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »



Greenkeeper badge

Build Status

Name your GitHub contributors; get commits, issues, and comments

name-your-contributors gets all of the code reviewers, commenters, issue and PR creators from your organization or repo.


$ npm install --save name-your-contributors

API Limits and setting up a GitHub Token

You also need to get a GitHub application token to access the API. Go here: Click on "Generate New Token". It needs to have the read:org scope in order to search by organization. Name the token something informative: name-your-contributors is a good name.

Set the token with the variable name $GITHUB_TOKEN before running the script:

export GITHUB_TOKEN=ab34e...

You can also set the var automatically in every session by adding the above line to your .bashrc file in your home directory.


GitHub regulates API traffic by a credit system. The limits are quite high; it's permitted to query hundreds of repos per hour using the repoContributors function, but some organisations have many hundreds of repos, and a single call to orgContributors could potentially exhaust your entire hourly quota. The WikiMedia Foundation is a good example of an org with way too many repos for this app to handle.

Unfortunately filtering by contributions before or after a given date has no effect on quota use, since the data still needs to be queried before it can be filtered.

For more details on rate limits, see


From Code

const nyc = require('name-your-contributors')
    token: process.env.GITHUB_TOKEN,
    user: 'RichardLitt',
    repo: 'name-your-contributors'
    }).then(//do something with the results
    token: process.env.GITHUB_TOKEN,
    orgName: 'ipfs',
    before: '2017-01-01',
    after: '2016-01-01'

From the Command Line

$ npm install -g name-your-contributors
export GITHUB_TOKEN={your-token}
$ name-your-contributors -u RichardLitt -r name-your-contributors
$ name-your-contributors -o ipfs -a 2017-01-01 > ipfs-contrib.json


orgContributors({orgName, token, before, after})


Type: string

Github auth token


Type: string

The organization to traverse. If no organization is provided, the script will find the username and repo for the local git repository and use that.


Type: string

The ISO timestamp to get contributors after.

Any string that will be accepted by new Date("...") will work here as expected.


Type: string

Get contributors from before this ISO timestamp.

repoContributors({user, repo, token, before, after})


Type: string

Github user name to whom the repo belongs.


Type: string

Only traverse the given repository.


MIT © Richard Littauer