Meet Sammy van Noistrom: the SVN Bot
Please join us as we welcome the newest Relish team member into the fold: Sammy van Noistrom, the SVN bot. Now I know what you’re thinking…
Who is Sammy?
Does Relish hire robots?
I’m a robot; can I work at Relish?
What is an SVN bot?
Alright, alright — let me quell some of the confusion by answering some of these right now.
Let’s start with the only non-ridiculous question…
What is an SVN bot, anyways?
See, when all the Relishers are all working away at our various projects and we commit some files to our subversion (SVN) repository, Sammy sends us notifications to let us know that these files have been committed. That way the whole team is constantly kept abreast of updates to a project.
But what makes Sammy special is that you can interact with him. After you add Sammy to your IM buddy list you can type something like “follow choicebot” to be notified of all commits made to the ChoiceBot project. That way you’re not being inundated with loads of instant messages — you’re only being updated on projects you’re actually working on.
Unsubscribing is just as easy. Type “unfollow choicebot” and you won’t receive any more updates.
Now, we developed Sammy for ourselves because we thought it would be useful and fun to build. Before Sammy came along, we were constantly sending each other one word IMs: “committed?”, “committed”. When you’re doing this every 5 minutes it gets a bit irritating. And besides, what else do geeks do when the office shuts down over Christmas? They write code!
When we were pulling together the various bits of code to build Sammy we were rather astounded at how user-unfriendly the few SVN bots were that we encountered during our Googling. Sometimes I felt like I needed an advance degree in Computer Engineering from MIT just to open the readme files. Not good. I knew we could do better.
And being the generous guys that we are, we’d like to share Sammy with the community at large. Sammy is a bit more user-friendly than the other SVN bots we found but you’ll still need a basic knowledge of PHP, FTP (specifically how to change file persmissions) and a bit of SVN smarts. We’re releasing it under the GNU General Public License, so feel free to carve it up and make it your own.
What makes Sammy tick
There are detailed installation instructions included in the download below but here’s how Sammy works in a nutshell:
- Sammy exists as a collection of PHP files on a web server that have been bot-ified by imified. Imified is a really cool service that makes this all possible, but unfortunately it does go offline occasionally so don’t be alarmed if your bot doesn’t work immediately. Imified might be on the fritz.
- Sammy listens to the SVN repository via “SVN hooks“. Hooks are built directly into every SVN repository and allow you to execute scripts when the repository is modified (i.e. files are added, removed, changed, etc). So when a commit is completed, the “post-commit” hook fires and runs a PHP script.
- Sammy keeps all of the subscriptions (which is what users subscribe to with “follow” commands) in a mySQL database. That way when a commit happens, it’s easy for Sammy to check the database to see if anybody is subscribing to that particular project and then send out the appropriate instant messages.
- The commands that Sammy understands (“follow”, “unfollow”, “enable”, “disable”) are defined in a plugin-like method so that it’s easy to add/remove functionality. We’ve provided what we consider to be “core”commands but we’d love to see where this can go with your great ideas.
Hopefully there are a few ubergeeks out there who a) understand what this is and b) are curious enough to check it out. Give it a spin and tell us what you think.
And say hi to the van Noistroms for us!
Sammy van Noistrom, the SVN Bot (v0.4) (24.2 KiB)
Jan 16, 2009 @ 7:08 pm
Nice! I think we might have to put Sammy to work here at IMified HQ.
Jan 16, 2009 @ 10:45 pm
Not bad. How about SVN over Twitter? http://76design.com/shiftcontrol/index.php/2008/12/11/monitoring-svn-commits-with-twitter/
Jan 16, 2009 @ 11:06 pm
[...] is the original post: Meet Sammy van Noistrom: the SVN Bot Related ArticlesBookmarksTags Commentaires sur CSS – Structurer, documenter et mainten [...]
Jan 17, 2009 @ 10:23 am
@brett – Twitter is definitely a good option. Your post is what got us thinking about this. We decided to go the IM route for a couple reasons.
First off, with IM I only get notifications if I’m online. We weren’t that interested in what happens ALL the time. The SVN client we use (Versions) tells us what commits we’ve missed when it starts up. Another neat thing about the IM approach is that I can decide to only ‘follow’ certain keywords. I don’t have to be alerted about EVERY commit.
Lastly, this is a personal thing, I don’t love the idea of having my Twitter feed jammed with a bunch of bot messages. No offence to any robots, rollbots or choicebots out there…
Jan 21, 2009 @ 9:47 pm
Good post Steve. Smart thinking.
Mar 17, 2009 @ 1:41 pm
Your nerd is showing.