From 904288affde8a5c8431233e3852ea21ab95a3210 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Wed, 13 Feb 2008 17:32:29 +0100 Subject: rss plugin: improve output for git commits in tracs --- data/rbot/plugins/rss.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/rbot/plugins/rss.rb b/data/rbot/plugins/rss.rb index 5e854239..f8d8c997 100644 --- a/data/rbot/plugins/rss.rb +++ b/data/rbot/plugins/rss.rb @@ -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 # visible in the URL anyway # TODO make this optional? - base_title.sub!(/^Changeset \[([\da-f]{40})\]/) { |c| "Changeset [...]"} if feed.type = 'trac' + base_title.sub!(/^Changeset \[([\da-f]{40})\]:/) { |c| "(git commit)"} if feed.type = 'trac' title = "#{Bold}#{base_title.ircify_html(tit_opt)}#{Bold}" end @@ -917,7 +917,7 @@ class RSSFeedsPlugin < Plugin line1 = "#{handle}#{date}Message #{title} sent by #{author}. #{desc}" when 'trac' line1 = "#{handle}#{date}#{title} @ #{link}" - unless item.title =~ /^Changeset \[(?:[\da-f]+|\.\.\.)\]/ + unless item.title =~ /^(?:Changeset \[(?:[\da-f]+)\]|\(git commit\))/ line2 = "#{handle}#{date}#{desc}" end when '/.' -- cgit v1.2.3