1.1.0 • Published 5 years ago
githookhandler v1.1.0
githook
Simple http server to handle github webhooks
Install
npm install githookhandler
Usage
const {init, hookEvent} = require('githookhandler');
const GITHUB_SECRET = "justacceptmyrequest";
const PORT = 3010;
hookEvent.on('push', ({repo, branch, resp})=>{
console.log(repo, branch)
})
hookEvent.on('ping', ()=>{
console.log('Ping received')
})
init(PORT, GITHUB_SECRET);