- Bitbucket (git + mercurial)
- GitHub
A Unix compatible system (fifo pipe)
A PHP5 webserver with json support (php5-json / php5-common)
Python + python-twisted-words
- It uses the post hooks from
Bitbucket and
Github
which are calling
the PHP script which then parses the json content and forwards it to
the IRC bot using a fifo pipe.
-
Make sure all requirements are installed
-
Edit
config.php
andcommitbot.py
-
Start the IRC bot:
./commitbot.py
-
Symlink or copy
*.php
to your www directory. e.g.:/var/www/commitbot
-
Bitbucket:
- Go to your repository settings (the cogwheel), then click on
hooks
and
add apost hook
, e.g.:http://userbot:password@1.2.3.4/commitbot/hook.php
- Go to your repository settings (the cogwheel), then click on
-
Github:
- Go to your respository settings, then click on
Webhooks & Services
and
add awebhook
(just push) (content type: application/x-www-form-urlencoded),
e.g.:http://userbot:password@1.2.3.4/commitbot/hook.php
- Go to your respository settings, then click on
-
Important: If you are using
suhosin
, then you must disable it in the
directory where ever you put the php files. Suhosin is adding backslashes
("magic quotes") which will break the json content in$_POST['payload']
.
Please seesuhosin_example_htaccess
(rename it to.htaccess
).
- Simply start it from a terminal:
php5 hook.php
- GPLv2