In order to get a notice on IRC whenever someone merges a change in Mahara, we picked the cia.vc service. This allows us to keep an eye on what is happening with the codebase.
If you want to replicate our setup, start by creating an account on cia.vc and then add a new project and an IRC bot to your account.
Registering an IRC channel for the commits
To avoid interrupting our main developer channel with commit messages, I thought of creating a separate channel for it on Freenode:
/msg chanserv register #mahara-commits
/msg chanserv op #mahara-commits fmarier
/msg chanserv set #mahara-commits guard on
/msg chanserv set #mahara-commits topiclock on
/msg chanserv set #mahara-commits email [email protected]
/msg chanserv set #mahara-commits url https://gitorious.org/mahara/mahara/commits
/msg chanserv set #mahara-commits secure on
/msg chanserv set #mahara-commits keeptopic on
/msg chanserv topic #mahara-commits Mahara project | https://mahara.org | Commit log from http://cia.vc/stats/project/Mahara
Sending code updates to cia.vc
Since the place where we host our code, Gitorious, doesn't support automatic notifications to cia.vc, we added a merge hook into our code review system to let cia.vc know whenever a commit gets merged into our branch.
You can take a look at the custom hook script we wrote for this (note that this script also updates our bugtracker at the same time), but here are a few notes if you want to write your own cia.vc client script:
- Client scripts can submit data via email or XMLRPC.
- The data needs to be sent in an XML document.
- Make sure your text nodes are trimmed and avoid CDATA sections.
- Keep an eye on Freenode's #commits while testing your script.