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



A streaming interface to pull in a list of commits from a GitHub repository.

If you're looking for something less specific, github on NPM covers a lot more ground with the GitHub API - but I was running into a lot of issues with paginating commits so I whipped this up to solve the problem quickly.


npm install github-commit-stream



Returns a readable stream that emits commit objects directly from the API.

Takes the following options:

  • user: The owner of the repository.
  • repo: The repository name.
  • token: Your GitHub API token. Optional.
  • per_page: The amount of commits to retrieve per request. Defaults to 30.
  • since: Filter to commits since this date.
  • until: Filter to commits until this date.
  • sha: SHA or branch to start listing commits from.
  • author: filter by commit author's login, name or email.
var commitStream = require('github-commit-stream')
    token: process.env.GITHUB_TOKEN
  , user: 'substack'
  , repo: 'node-browserify'
}).on('data', function(d) {