Table of Contents
get your commit log read in IRC live!
Something I whipped up after finding a lack of IRC Git bots. Simply posts the info on the commit and a shortened URL to the channel of your choosing
Requirements
- irccat - http://irccat.rubyforge.org/
- git
- curl
Install
On a server or localhost: sudo gem install irc_cat
Configure irc_cat by following the instructions.
In the git repository directory: nano hooks/post_commit
Paste the following, replacing things as needed.
#!/bin/bash
# remember to set URLHERE and PROJECTNAMHERE to your irc_cat tcp url and your indefero project title (respectively)
url=`git log -1 --format=%h`
curl=`curl -s http://is.gd/api.php?longurl=http://code.nookdevs.com/p/PROJECTNAMEHERE/source/commit/${url}`
git log -1 --format="[git] %an, %ar. %s ${curl}" | nc URLHERE 5678
Startup irc_cat, check that it joined your room, make a commit and ta-da! Live IRC notifications!