node-github-webhook
Advanced tools
Comparing version 1.0.3 to 1.0.5
24
index.js
@@ -19,2 +19,11 @@ /** | ||
function findHandler(url, arr) { | ||
var ret = arr[0] | ||
for (var i = 0; i < arr.length; i++) { | ||
if (url.split('?').shift() === arr[i].path) | ||
ret = arr[i] | ||
} | ||
return ret | ||
} | ||
function create(options) { | ||
@@ -37,12 +46,2 @@ // make it an EventEmitter, sort of | ||
function findHandler(url, arr) { | ||
var ret = arr[0] | ||
for (var i = 0; i < arr.length; i++) { | ||
if (url.split('?').shift() === arr[i].path) | ||
ret = arr[i] | ||
} | ||
console.log(ret) | ||
return ret | ||
} | ||
function checkType(options) { | ||
@@ -57,5 +56,2 @@ if (!isObject(options)) | ||
throw new TypeError('must provide a \'secret\' option') | ||
if (Array.isArray(options.events) && options.events.indexOf('*') === -1) | ||
throw new TypeError('must provide an events array') | ||
} | ||
@@ -89,3 +85,3 @@ | ||
if (events && events.indexOf(event) == -1) | ||
if (events && events.indexOf(event) === -1) | ||
return hasError('X-Github-Event is not acceptable') | ||
@@ -92,0 +88,0 @@ |
{ | ||
"name": "node-github-webhook", | ||
"version": "1.0.3", | ||
"version": "1.0.5", | ||
"description": "Github Webhooks handler based on Node.js. Support multiple handlers.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
# node-github-webhook | ||
Github Webhooks handler based on Node.js. Support multiple handlers. | ||
### Install | ||
`npm install node-github-webhook --save` | ||
### Instructions | ||
@@ -5,0 +9,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
60
8448
93