]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
rss plugin: improve output for git commits in tracs
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Wed, 13 Feb 2008 16:32:29 +0000 (17:32 +0100)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Wed, 13 Feb 2008 16:32:29 +0000 (17:32 +0100)
data/rbot/plugins/rss.rb

index 5e854239090db84da32454ccd6d119b0bf1e9a5a..f8d8c99795647db4672edbd791ee2675c012eb15 100644 (file)
@@ -868,7 +868,7 @@ class RSSFeedsPlugin < Plugin
       # git changesets are SHA1 hashes (40 hex digits), way too long, get rid of them, as they are\r
       # visible in the URL anyway\r
       # TODO make this optional?\r
-      base_title.sub!(/^Changeset \[([\da-f]{40})\]/) { |c| "Changeset [...]"} if feed.type = 'trac'\r
+      base_title.sub!(/^Changeset \[([\da-f]{40})\]:/) { |c| "(git commit)"} if feed.type = 'trac'\r
       title = "#{Bold}#{base_title.ircify_html(tit_opt)}#{Bold}"\r
     end\r
 \r
@@ -917,7 +917,7 @@ class RSSFeedsPlugin < Plugin
       line1 = "#{handle}#{date}Message #{title} sent by #{author}. #{desc}"\r
     when 'trac'\r
       line1 = "#{handle}#{date}#{title} @ #{link}"\r
-      unless item.title =~ /^Changeset \[(?:[\da-f]+|\.\.\.)\]/\r
+      unless item.title =~ /^(?:Changeset \[(?:[\da-f]+)\]|\(git commit\))/\r
         line2 = "#{handle}#{date}#{desc}"\r
       end\r
     when '/.'\r