[前][次][番号順一覧][スレッド一覧]

ruby-changes:37620

From: naruse <ko1@a...>
Date: Mon, 23 Feb 2015 18:30:44 +0900 (JST)
Subject: [ruby-changes:37620] naruse:r49701 (trunk): bold closed tickets

naruse	2015-02-23 18:30:24 +0900 (Mon, 23 Feb 2015)

  New Revision: 49701

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=49701

  Log:
    bold closed tickets

  Modified files:
    trunk/tool/redmine-backporter.rb
Index: tool/redmine-backporter.rb
===================================================================
--- tool/redmine-backporter.rb	(revision 49700)
+++ tool/redmine-backporter.rb	(revision 49701)
@@ -300,6 +300,15 @@ def backport_command_string https://github.com/ruby/ruby/blob/trunk/tool/redmine-backporter.rb#L300
   " 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 https://github.com/ruby/ruby/blob/trunk/tool/redmine-backporter.rb#L335
     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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]