github-webhook-forwarding
Version:
Forwards Github Webhooks to overcome the maximum number of webhooks allowed by Github (20)
17 lines (14 loc) • 368 B
JavaScript
var sendRequest = require('./sendrequest')
module.exports = exports = function (config) {
var payload = {
path: '/orgs/' + config.gitOwner + '/hooks',
headers: {
Authorization: 'Basic ' + config.gitAuth
}
}
return sendRequest(config, payload, false, 200)
.then((response) => {
return JSON.parse(response.body)
})
}