notify-webhook is a git post-receive hook script that posts JSON data to a web hook capable server.
As an example, this script works very well with commitbot which sends commit notifications to XMPP group chat rooms.
To use notify-webhook, just copy
notify-webhook.py to your
.git/hooks dir and call it
post-receive. Be sure to
set it executable with
chmod 755 post-receive as well.
You'll need to edit the very top of the file where the constants are defined.
POST_URLis the URL of the web hook server
REPO_URLis the URL of your repository browser
COMMIT_URLis the URL of a commit in your respository browser. '%s' in this string will be replaced with the SHA1 hash.
REPO_NAMEis the name of the repository
REPO_OWNER_NAMEis name of the repository owner
REPO_OWNER_EMAILis the repository owner's e-mail address
REPO_DESCis the repository description