git-commit-stream

v0.1.0
Watch for new commits in a Git repo

Git Commit Stream

This package lets you programatically monitor changes in a Git repository. Might be useful if you host repos on your own server, and want to do something when there's a change.

Example

var CommitStream = require('git-commit-stream');
var commitstreamPromise = CommitStream.open('/path/to/repo');

commitstreamPromise.then(function(commitstream) {
  commitstream.on('newCommits', function(refname, commits) {
    commits.forEach(function(commit) {
      console.log('New comit arrived!');
      console.log(commit.message());
    });
  });
});

Command-line usage

bin/watch-repo /path/to/repo
npm i git-commit-stream

Metadata

  • ISC
  • Whatever
  • Maciej Bielecki
  • released 11/1/2014

Downloads

Maintainers