Skip to main content

Commit log IRC bot... for a KDE project

For Kate we have a cia.vc IRC bot posting stuff like this when new Kate related content is commited:

[00:18:29] <cia-20> ehamberg * r874179 [..]/katevikeysequenceparser.cpp
[00:18:29] <cia-20> fix crash when a qkeyevent's text() is empty
[00:18:29] <cia-20> http://websvn.kde.org/?view=rev&revision=874179

As cia.vc seems to attribute all KDE commits to project "KDE" and not its actual children (i.e. "Kate" in our case) and because getting the above n-liner with Websvn link is not completely trivial so I thought I blog about it and show our current "Advanced Filtering" code here:

<and>
 <or>
  <match path="project">Kate</match>
  <match path="project">KDE</match>
 </or>
 <or>
  <find path="files">KDE/kdesdk/kate</find>
  <find path="files">KDE/kdelibs/kate</find>
  <find path="files">KDE/kdesdk/doc/kate</find>
  <find path="files">KDE/kdelibs/interfaces/ktexteditor</find>
 </or>
</and>
>  
<formatter medium="irc">
 <format appliesTo="CommitToIRC">
  <autoHide>
   <color fg='green'><author/></color>
  </autoHide>
  <autoHide>
   <color fg='orange'><branch/></color>
  </autoHide>
  *
  <autoHide>
   r<b><revision/></b>
  </autoHide>
  <files/>
  <br/><log/>
  <autoHide>
   <br/>http://websvn.kde.org/?view=rev&amp;revision=<revision/>
  </autoHide>
 </format>
</formatter>

I'm very happy to see that cia.cv

  • provides such a service
  • has online validation of the filter code so you won't save a broken filter
  • has invented such a nice XML format

Well done guys, I'm impressed.