Permalink
Browse files

0.1.6, document branch argument to push event

  • Loading branch information...
1 parent cda1f89 commit 582528b564eaa89cb03b23c3b6bfb7de8314aa3f @substack committed Aug 14, 2012
Showing with 14 additions and 9 deletions.
  1. +8 −6 README.markdown
  2. +5 −2 example/simple.js
  3. +1 −1 package.json
View
@@ -12,8 +12,11 @@ This library makes it super easy to set up custom git push deploy logic.
var pushover = require('pushover');
var repos = pushover(__dirname + '/repos');
-repos.on('push', function (repo, commit) {
- console.log('received a push to ' + repo + '/' + commit);
+repos.on('push', function (repo, commit, branch) {
+ console.log(
+ 'received a push to ' + repo + '/' + commit
+ + ' (' + branch + ')'
+ );
});
repos.listen(7000);
@@ -43,7 +46,7 @@ and then...
```
$ node example/simple.js
-received a push to beep/d5013a53a0e139804e729a12107fc212f11e64c3
+received a push to beep/d5013a53a0e139804e729a12107fc212f11e64c3 (master)
```
# methods
@@ -94,10 +97,9 @@ Find out whether `repoName` exists in the callback `cb(exists)`.
# events
-## repos.on('push', function (repo, commit) { ... }
+## repos.on('push', function (repo, commit, branch) { ... }
-Emitted when somebody does a `git push` to the repo. The repository name `repo`
-and the `commit` hash are the arguments.
+Emitted when somebody does a `git push` to the repo.
# install
View
@@ -1,8 +1,11 @@
var pushover = require('pushover');
var repos = pushover(__dirname + '/repos');
-repos.on('push', function (repo, commit) {
- console.log('received a push to ' + repo + '/' + commit);
+repos.on('push', function (repo, commit, branch) {
+ console.log(
+ 'received a push to ' + repo + '/' + commit
+ + ' (' + branch + ')'
+ );
});
repos.listen(7005);
View
@@ -1,7 +1,7 @@
{
"name" : "pushover",
"description" : "git push deploy server over http",
- "version" : "0.1.5",
+ "version" : "0.1.6",
"repository" : {
"type" : "git",
"url" : "git://github.com/substack/pushover.git"

0 comments on commit 582528b

Please sign in to comment.