typeof-github-event
Detect the type of github webhook events.
Install
Install with npm:
$ npm install --save typeof-github-event
Install with yarn:
$ yarn add typeof-github-event
Usage
var events = ;
.typeof
Get the type of github event based on the given payload.
var type = events;console;//=> commit_comment
.is
Check if the payload is a the given event type.
if events console;
.is{Event}
Checks if the payload is the specific event type.
if events console;
About
Related projects
- 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
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Building docs
(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 tests
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
Author
Brian Woodward
License
Copyright © 2017, Brian Woodward. Released under the MIT License.
This file was generated by verb-generate-readme, v0.6.0, on May 18, 2017.