Image copyright Ryan McGuire
This is part two of the two part series on how I created a Subversion post-commit hook using Go, and post a message in a HipChat room. This post follows part one by talking about how to post the message to HipChat. I did this for the teams at my day job. Please note that certain pieces of code have been changed to protect the innocent, and opinions here do not necessarily reflect those of my employer.
In part one of this two part series I talked about how to execute
svnlook.exe on the command line using Go, then capture that output. Once captured the idea is to post a message in HipChat (or any other communication platform, should you choose to) to let teams know what code is going into a trunk/master/main/release branch. Please note that this code demonstrates consuming the HipChat API v1, which was current enough at the time I wrote this hook. HipChat has now published version 2 of their API and will deprecate version 1.