From 13307cd9444d17dff2da1d0ff03efcede23ad88d Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Tue, 28 May 2024 11:46:01 -0700 Subject: [PATCH] redmine-backporter.rb: Highlight closed tickets --- tool/redmine-backporter.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tool/redmine-backporter.rb b/tool/redmine-backporter.rb index 47310c5abd..6c3477b79b 100755 --- a/tool/redmine-backporter.rb +++ b/tool/redmine-backporter.rb @@ -221,10 +221,11 @@ commands = { @issues = issues = res["issues"] from = res["offset"] + 1 total = res["total_count"] + closed = issues.count { |x, _| x["status"]["name"] == "Closed" } to = from + issues.size - 1 - puts "#{from}-#{to} / #{total}" + puts "#{from}-#{to} / #{total} (closed: #{closed})" issues.each_with_index do |x, i| - id = "##{x["id"]}".color(*PRIORITIES[x["priority"]["name"]]) + id = "##{x["id"]}".color(*PRIORITIES[x["priority"]["name"]], bold: x["status"]["name"] == "Closed") puts "#{'%2d' % i} #{id} #{x["priority"]["name"][0]} #{status_char(x["status"])} #{x["subject"][0,80]}" end },