Skip to main content

Run command on GitHub and BitBucket POST request hooks

Project description

Run command on GitHub and BitBucket POST request hooks.


You can install hooked in a virtualenv (with virtualenvwrapper and pip):

$ mkvirtualenv hooked
(hooked) $ pip install hooked

Or if you want to contribute some patches to hooked:

$ git clone
$ cd hooked/
$ mkvirtualenv hooked
(hooked) $ python develop


Create a configuration file that looks like:

$ cat path/to/config.cfg

host =
port = 8080
server = cherrypy
debug = true

repository = myrepo
branch = master
command = /path/to/

#repository = # will match all repository
#branch = # will match all branches
command = /path/to/other/

Note that the [server] section is optional, the defaults are:

host = localhost
port = 8888
server = wsgiref
debug = false


Run the hooked server by running the following command:

(hooked) $ hooked path/to/config.cfg

Then visit http://localhost:8888/, it should return the current configuration for this hooked server. If this works, you are ready to configure GitHub and BitBucket POST request web hooks to your hooked server listening address, for example: http://localhost:8888/.



To make a new release, do the following steps:

$ vi  # bump version
$ git add
$ git commit -m "bump version to X.X.X"
$ git tag vX.X.X
$ git push --tags
$ python sdist upload


Thanks to the hook-server and githook projects for inspiration.

Project details

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
hooked-0.1.tar.gz (4.3 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page