tracaware.rb for Rbot
When working with Trac, Subversion and IRC it’s cool to have a comit bot who tells you htat something has happened in the respository. For http://karen.bthstudent.se we use rbot and a svn reporting plugin I found some night via Google. It’s not the best solution but it’s been in use for four or five months now.
In the middle of Febuary I asked my self, how hard could it be to extract things from the trac database and present that in the IRC channel? Well, it wasn’t too hard. The first plan was to make the bot activate at key patters (#123 and r123 for tickets and revisions), that has however not been implemented. It would kill the channels some days so I guess it won’t see the day light at all. I have had some prototype code for it but discarded it with no backup =)
What I have done on the other hand is the possibility to ask for revision information, ticket info, last updates and such things. All this available at a Mercurial repository and licensed as GPL2, use it – extend or just don’t care.
To get the code you can pull from http://hg.sis.bthstudent.se/tracaware or download the zip/tar gzip/bzip2 archive. Place the file (tracaware.rb in the plugin directory of rbot, edit the first three settings. @tracurl, @database and @locale (only en and sv for now, patches are welcome!), when done just restart the rbot and you are ready to go.
!trac #123 – Shows info about the ticket.
!trac r123 – Shows info about the revision.
!trac lastbug – Shows info about the last updated ticket (same as !trac lastticket).
!trac lastrev – Shows info about the last committed revision.
!trac lastwiki – Shows info about the last updated wiki page.
That’s all for now! I guess there will be some update in the future.
Läs även andra bloggares åsikter om rbot, plugin, trac, mercurial, subversion, hg, svn, irc, programmering, kod, ruby
In other news
Tre snabba innan jag drar till Kna och träffar mor för lite specialarekvällsmatspryl (hon är i hörnet här borta för nån konferensgrejja eller nåt).
- Lamporna i myshörnan är toknajs, snodde mattes donerade golvlampa till ena hörnet. Sågade ett hål i dörrkarmen till elrummet så att jag fick ut en grendosa. Drog kabellist på väggen och monterade min ”Trettio” från IKEA och släckte därmed trapphusbelysningen. Med mattan och soffan är allt tokcozy nu.
- Tommy Svensson (VD på SoftCenter tillika bosatt i Karlskrona) har överklagat Karlskrona kommuns satsning på högskolan, vi får se vad det här leder till.
- Blev warpdrivead igår. Jag är ju partisk men jag tycker att det är humor, warpdrive-läsarna är klart humorbefriade… (-51 vid skrivande stund)
leave a comment