A simple Git post-receive
hook script for notifying a room in HipChat of Phabricator repository changes.
- Clone this repository somewhere on your repository host server.
- Clone hipchat-cli somewhere on your repository host server.
- Go to the
hooks
directory in a repository you want to set up the hooks for and add apost-receive
script like this one and make sure it's executable.
You can lookup the HipChat room ID from the rooms/list API or use the HipChat room name (remember to URL-encode it)
#!/bin/sh
HIPCHAT_SCRIPT="/path/to/hipchat_room_message"
. /path/to/hipchat-post-receive
And you're done!
For Phabricator, add the following configuration to the post-receive
hook before the hipchat-post-receive
source line.
export PHAB="phab.example.com"
export REPO="RepoName"
Optionally, set a callsign if it differs from your repository name.
export CALLSIGN="REPO"