hubhook
A github post-commit service hook handler
example:
example.js
var hook = ; var http = ; http; hook;
output:
(example with a random repo of mine)
$ node example.js
{ pusher: { name: 'none' },
repository:
{ name: 'my-little-proxy',
size: 168,
has_wiki: true,
created_at: '2012-09-16T12:08:06-07:00',
private: false,
watchers: 6,
url: 'https://github.com/jesusabdullah/my-little-proxy',
fork: false,
language: 'JavaScript',
pushed_at: '2012-09-23T02:04:52-07:00',
id: 5832190,
***snip***
API:
var HubHook = require('hubhook')
var hook = new HubHook;
A constructor. Can call without new
like so: var hook = HubHook()
.
hook.handle(req, res)
Handle the request as a webhook post.
event: "payload"
This event is emitted after hook.handle processes a hook payload.
Tests:
$ npm test
License:
MIT/X11