Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Ruby
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
config
lib/webhook
log
spec
.gitignore
.rspec
.travis.yml
Gemfile
Gemfile.lock
Guardfile
LICENSE
Procfile
README.md
Rakefile
config.ru

README.md

GitHub Webhook Endpoint

Build Status Coverage Status Code Climate Dependency Status

This listens for GitHub Repository Hook API calls. Currently, it handles post-receive hooks to run a script after a hook call is made.

Deployment is handled with chef, so find the appropriate recipe for details about running the service. At the time of this writing, we're using Upstart, so you control it like any Upstart job, e.g.

sudo status webhook
sudo stop webhook
sudo start webhook
sudo restart webhook

Testing

Here's a simple way to test that it responds. Create a config, start up the server, and issue a curl request.

Sample Config

my_repo:
  hook: 'echo sleeping && sleep 2 && echo it ran!'
curl -d 'payload={"before":"", "after":"", "ref":""}' http://localhost:3000/my_repo

In your server process, you should see

sleeping
it ran!

Copyright SmartReceipt

Something went wrong with that request. Please try again.