From a525fbf06fd07e31ebe49b9b41685f2863c20afe Mon Sep 17 00:00:00 2001 From: naruse Date: Mon, 23 Feb 2015 09:30:24 +0000 Subject: bold closed tickets git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- tool/redmine-backporter.rb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'tool/redmine-backporter.rb') diff --git a/tool/redmine-backporter.rb b/tool/redmine-backporter.rb index c50d2a379e..865c164103 100755 --- a/tool/redmine-backporter.rb +++ b/tool/redmine-backporter.rb @@ -300,6 +300,15 @@ def backport_command_string " backport --ticket=#{@issue} #{@changesets.join(',')}" end +def status_char(obj) + case obj["name"] + when "Closed" + "C".color(bold: true) + else + obj["name"][0] + end +end + console = IO.console row, col = console.winsize @query['limit'] = row - 2 @@ -326,7 +335,7 @@ while true puts "#{from}-#{to} / #{total}" issues.each_with_index do |x, i| id = "##{x["id"]}".color(*PRIORITIES[x["priority"]["name"]]) - puts "#{'%2d' % i} #{id} #{x["priority"]["name"][0]} #{x["status"]["name"][0]} #{x["subject"][0,80]}" + puts "#{'%2d' % i} #{id} #{x["priority"]["name"][0]} #{status_char(x["status"])} #{x["subject"][0,80]}" end when /\A(?:show +)?(\d+)\z/ id = $1.to_i -- cgit v1.2.1