github-commit-stream
A streaming interface to pull in a list of commits from a GitHub repository
Last updated 6 years ago by hughsk .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install github-commit-stream 
SYNC missed versions from official npm registry.

github-commit-stream

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.

Installation

npm install github-commit-stream

Usage

exports.createStream(options)

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')

commitStream({
    token: process.env.GITHUB_TOKEN
  , user: 'substack'
  , repo: 'node-browserify'
}).on('data', function(d) {
  console.log(d.commit.message)
})

Current Tags

  • 0.1.0                                ...           latest (6 years ago)

3 Versions

  • 0.1.0                                ...           6 years ago
  • 0.0.1                                ...           6 years ago
  • 0.0.0                                ...           7 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 5
Last Day 0
Last Week 5
Last Month 33
Dependencies (4)
Dev Dependencies (0)
None

Copyright 2014 - 2016 © taobao.org |