Skip to content

a simple github post-receive hook implemented as connect middleware

License

Notifications You must be signed in to change notification settings

gleitz/connect-githubhook

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

connect-githubhook

This is a simple github post-receive hook implemented as connect middleware for integration with existing apps

var express = require('express'),
    cgh = require('connect-githubhook'),
    sites = { '/supersecretpath': {url: 'https://github.com/yourname/yourrepo',
                                   branch: 'master'},
    app = express.createServer();

var handler = function (repo, payload) {
    console.log('received push from:', repo); // received push from: yourrepo
};

app.use(express.bodyParser()); //required
app.use(cgh(sites, handler));

app.listen(8000);

license

MIT

About

a simple github post-receive hook implemented as connect middleware

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%