Detect the type of github webhook events.
Install with npm:
$ npm install --save typeof-github-event
Install with yarn:
$ yarn add typeof-github-event
var events = require('typeof-github-event');
Get the type of github event based on the given payload.
var type = events.typeof(payload);
console.log(type);
//=> commit_comment
Check if the payload is a the given event type.
if (events.is('commit_comment', payload)) {
console.log('commit_comment');
}
Checks if the payload is the specific event type.
if (events.isCommitComment(payload)) {
console.log('commit_comment');
}
- github-base: JavaScript wrapper that greatly simplifies working with GitHub's API. | homepage
- githubbot: Starting point for registering event handlers and handling payloads coming from github webhooks. Allows usage… more | homepage
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)
To generate the readme, run the following command:
$ npm install -g verbose/verb#dev verb-generate-readme && verb
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
$ npm install && npm test
Brian Woodward
Copyright © 2017, Brian Woodward. Released under the MIT License.
This file was generated by verb-generate-readme, v0.6.0, on May 18, 2017.