0.0.2 • Published 3 years ago

smallhook v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

SmallHook

A simple and tiny Webhook parser for GitHub. It uses mustache template engine to create an output text.

Usage

const { render } = require('smallhook');

const template = `{{ sender.login }} pushed to {{ repository.full_name }}`;

// payload is an object from GitHub Webhook
// the first argument is from X-GitHub-Event http header

const output = render('push', payload, template);

console.log(output);

// OUTPUT:
// seanghay pushed to seanghay/smallhook