Octoturtle

Octoturtle is a dead simple fluent library for responding to Github
webhooks. Primarily inspired by Docker's awesome issue and PR auditor
@GordonTheTurtle, Octoturtle seeks to make it easy for any repository owner to
specify and enforce a set of rules for contributing to a repository.
Here's a simple Octoturtle rule based on Docker's #dibs policy for claiming
issues:
const octoturtle = require('octoturtle');
const config = require('./config.json');
const whenAn = octoturtle;
const github = new octoturtle.Github(config.GITHUB_USER, config.GITHUB_TOKEN);
const hook = whenAn('issues').is('opened').to('octoturtle');
function bodyContainsDibs(event, payload) {
payload.getIssueBody().includes('dibs');
}
hook.if(bodyContainsDibs, github.applyLabels(['dibs']));
Installation
You can deploy your own Octoturtle auditor easily using either Express or with
Lambda using Gordon.
First, install Yeoman and generator-octoturtle using
npm (we assume you have pre-installed
node.js).
npm install -g yo
npm install -g generator-octoturtle
Then generate your new auditor:
yo octoturtle