smallhook

0.0.2 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i smallhook

Weekly Downloads

1

Version

0.0.2

License

MIT

Unpacked Size

4.21 kB

Total Files

28

Last publish

Collaborators

  • seanghay