Skip to main content

Simple server to listen for GitHub repo hooks.

Project description

A picture is worth a thousand words:

http://adi.roiban.ro/media/img/articles/2013/txghserf.jpg

This is just a boilerplate for implementing a GitHub Service Hooks server based on Klein and Twisted.

Implement your on “run.py” and start it like:

twistd -n web --class=run.resource

It will parse incoming hooks and return an ‘Event’ containing hook name, event name and JSON payload.

Configure GitHub Hooks using:

http://host:port/hook/HOOK-NAME

HOOK-NAME is just a random string to track the source of the hook or implement multiple hooks on the same server.

It also include a simple web tool to register hooks or check hook status. Login using GitHub credentials:

http://host:port/

Development

Get virtual environment and install dependencies:

make deps

Run the tests:

make test

Run the server:

make run

TODO

  • Add proper pagination for GitHub API… not it just request 1000 entries.

  • Add configuration and checking of secret

Thanks

This project is standing on the shoulders of giants:

  • Twisted Matrix

  • Klein

  • AngularJS

  • AngujarJS-UI Bootstrap

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

txghserf-0.2.3.tar.gz (16.6 kB view details)

Uploaded Source

File details

Details for the file txghserf-0.2.3.tar.gz.

File metadata

  • Download URL: txghserf-0.2.3.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for txghserf-0.2.3.tar.gz
Algorithm Hash digest
SHA256 ebd61b58a464f2604aef2bcb2996bad3bf2c71c098e6fdcddddc2a6d62ab65e0
MD5 8fd79a9c69ea84b0514f9e79941cee3a
BLAKE2b-256 56631d201a46b5efc0ede3479fa78ea32f502b083a99231aa25b49f0e5c9e43c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page