Skip to content

zmlka/lambdog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LAMBDOG

A serverless bot for rich management and approval of GitHub Pull Requests. It allows you to set approval conditions for Pull Requests, only merging them in after they have been met.

Key features:

  • Serverless
  • Triggered by WebHooks
  • Complex PR approval conditions (eg: one member of group "developers" and two "operations**)
  • Text-file based configuration stored on GitHub
  • Controlled through comments
  • Strong audit trail

For an example of this this in action, check PRs in Lambdog's repo.


Why

If you are going full devops, there are two interesting new things going on in your workflow: everything is code, and everything is automated.

A byproduct of this is that you probably have everything on GitHub. Your application code, your Terraform templates, your kubernetes configuration, etc, with everything being connected to a Continuous Integration service that automatically deploys to production.

The modern workflow is:

  1. Commit on GitHub
  2. CI runs tests
  3. If successful, deploy
  4. Commit on GitHub
  5. CI runs tests
  6. etc

In the real world, you need more checks and balances than satisfying tests. You need a strict approval process and audit trail.

Lambdog was made because GitHub's native approver functionality is not powerful enough.

If your project has sufficient complexity, is in an enterprise or regulated environment, GitHub's built in approve feature might not cut it.

The advantage of having all interactions and configurations stored in GitHub is that you are already using GitHub. Nothing new to take care of.

How it works

  1. Configuration files sepcifying approve conditions are stored in a GitHub Repo
  2. When a new PR or PR comment (create, edit, detete) takes place, Lambdog is triggered
  3. If conditions are met Lambdog will merge in the PR.

Configuring

Installing

How to build

  • Install NPM.
  • Install Purescript: w/
    npm install -g purescript pulp bower
    
  • Install dependencies and build:
    npm install
    bower install
    pulp build
    

Deploy

See serverless documentation.

Deploy as google cloud function:

serverless deploy

(needs authentication setup)

How to deploy locally for testing

Full instructions at documentation.

npm install -g @google-cloud/functions-emulator
functions-emulator start
functions-emulator call http --data='{"json": "payload here"}'

View the logs:

functions-emulator logs read

About

a watchful GutHub bot that only takes commands from its approved owners

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors