This is a simple python webapp which listens for POST hook calls from bitbucket and forwards them on to a local irkerd instance as an appropriately formatted json call.
Run this as a simple webserver and point the github webhook or bitbucket's POST hook at the server.
For bitbucket, point the hook at:
For github, point the hook at:
where project is the project name that irker will use to announce commits.
The irker server, port, colour mode (mIRC or none) and channels to announce on can be configured in either the source, or the config file (loaded from the WEBHOOK_CONFIG env variable).
To enable pull_request events on the web hook, you need to use the github api to configure a web service hook for this.
To enable the hook, post a suitable request to the github api:
- To list the enabled hooks, use
- curl -u "<user>" https://api.github.com/repos/<user>/<project>/hooks
NB: The github doc examples use "content_type: json". While we do support this, it is not particularly well-tested code yet, so use with caution.
By default, this silently skips any exceptions from malformed posts and so forth.
To log errors more verboses, set LOG_ERRORS in the config file
To log details of requests and messages sent to irker, for debugging and so forth, set LOG_INFO in the config file
Use LOG_FILE to set the output file, if desired