# limit to 160 characters, and most of them are under 140 characters\r
tit_opt[:limit] = @bot.config['rss.head_max'] unless feed.type == 'twitter'\r
\r
- title = "#{Bold}#{item.title.to_s.ircify_html(tit_opt)}#{Bold}" if item.title\r
+ if item.title\r
+ base_title = item.title.to_s.dup\r
+ # 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
+ title = "#{Bold}#{base_title.ircify_html(tit_opt)}#{Bold}"\r
+ end\r
\r
desc_opt = {\r
:limit => @bot.config['rss.text_max'],\r
line1 = "#{handle}#{date}Message #{title} sent by #{author}. #{desc}"\r
when 'trac'\r
line1 = "#{handle}#{date}#{title} @ #{link}"\r
- unless item.title =~ /^Changeset \[(\d+)\]/\r
+ unless item.title =~ /^Changeset \[(?:[\da-f]+|\.\.\.)\]/\r
line2 = "#{handle}#{date}#{desc}"\r
end\r
when '/.'\r