Utsikter från en balkong i Varberg

tracaware.rb for Rbot

Posted in Datorer, SIS by Martin Bagge / brother on 23/4 2009

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 , , , , , , , , , ,



Fyll i dina uppgifter nedan eller klicka på en ikon för att logga in:

WordPress.com Logo

Du kommenterar med ditt WordPress.com-konto. Logga ut /  Ändra )


Du kommenterar med ditt Google+-konto. Logga ut /  Ändra )


Du kommenterar med ditt Twitter-konto. Logga ut /  Ändra )


Du kommenterar med ditt Facebook-konto. Logga ut /  Ändra )


Ansluter till %s

%d bloggare gillar detta: