Most of the bits are already in my Beer Slurped plugin, just need to abstract out a bit more since it assumes you've checked in already.