Hipchat notification after SVN commit

Get a channel notification token from the Hipchat control panel.

Put this script under the hooks directory of the SVN repository

WHO="$(svnlook author -r $REV $REPOS)"
LOG="$(svnlook log -r $REV $REPOS)"

MESSAGE="Commit to $REPOS by $WHO ($LOG) - https://svn.example.org/blah/$REV/diff"


curl --silent --insecure -H "Content-Type: application/json" \
     -X POST \
     -d "{\"color\": \"green\", \"message_format\": \"text\", \"message\": \"$MESSAGE\" }" \

Any commit will trigger the script and you’ll receive a message looking like:

Commit to /home/svn/salt by SEB (this is a commit message) - https://svn.example.org/blah/145/diff

Thanks for reading this post!

Did you find an issue in this article?

- click on the following Github link
- log into Github with your account
- click on the line number containing the error
- click on the "..." button
- choose "Reference in new issue"
- add a title and your comment
- click "Submit new issue"

Your feedback is much appreciated! πŸ€œπŸΌπŸ€›πŸΌ

You can also drop me a line below!