Archive for May, 2009

github: Send e-mail on push

May 31st, 2009

I’ve been looking for a way to have github, my favorite repository hosting service, send emails to interested parties whenever someone pushes new commits into the repository, They don’t seem to provide this service directly, but they do provide both an API for programatically querying the site as well as post-receive callbacks. The latter sends a POST request to URL(s) of your choice. The POST request includes JSON data which contains information about the repository and the new commits (for details, see here). Using this, I was able to put together a relatively simple PHP script which repackages this information into a human-readable form and sends it off in an email (source code here).

I wanted to use the github API to get a list of those who watch the project, and then send an email to those people. Unfortunately the API does not let you query that yet. Instead, my script lets you specify the recipients manually. Alternatively, a simple mailing list implementation is provided so people can sign up for the post-receive emails through a webpage instead.

The only downside is that the JSON github provides does not include information about how many lines were modified, just files. In this respect, Andy Parkin’s post-receive script produces slightly more informative e-mails (but of course it doesn’t work with github).

David Underhill Coding, PHP, version control , , ,

Projects list updated

May 21st, 2009

I’ve revamped the front page to list current projects instead of past ones. I’ve also updated the Projects page to include some more recent projects including jToolbar, a minimum spanning tree algorithm library, and the ENVI network visualization and control framework. I also updated ltprotocol to provide additional and more symmetric (between the client and server) callbacks.

David Underhill Coding, Software ,