From c7bb076320116e6a535bf64dc84d797362fe9a64 Mon Sep 17 00:00:00 2001 From: Yuji Ueki Date: Tue, 24 Sep 2019 04:03:58 +0900 Subject: [PATCH] :bug: Fix title label light black color to white to make more readable --- lib/circleci/cli/command/watch_command.rb | 2 +- .../cli/command/watch_command/build_watcher.rb | 6 +++--- lib/circleci/cli/printer/build_printer.rb | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/circleci/cli/command/watch_command.rb b/lib/circleci/cli/command/watch_command.rb index 3801469..1da02ce 100644 --- a/lib/circleci/cli/command/watch_command.rb +++ b/lib/circleci/cli/command/watch_command.rb @@ -57,7 +57,7 @@ def start_watcher_if_needed def show_interrupted_build_results # rubocop:disable Metrics/AbcSize @repository.builds_to_show.select(&:finished?).each do |build| b = Response::Build.get(build.username, build.reponame, build.build_number) - title = "✅ Result of #{build.project_name} ##{build.build_number} completed in background".light_black + title = "✅ Result of #{build.project_name} ##{build.build_number} completed in background" say Printer::BuildPrinter.header_for(build, title) say Printer::StepPrinter.new(b.steps, pretty: @options.verbose).to_s @repository.mark_as_shown(b.build_number) diff --git a/lib/circleci/cli/command/watch_command/build_watcher.rb b/lib/circleci/cli/command/watch_command/build_watcher.rb index c3ccc01..7c2606f 100644 --- a/lib/circleci/cli/command/watch_command/build_watcher.rb +++ b/lib/circleci/cli/command/watch_command/build_watcher.rb @@ -28,9 +28,9 @@ def stop(status) def bind_event_handling(channel) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength @client.bind_event_json(channel, 'newAction') do |json| if @verbose - print_bordered json['log']['name'].light_black + print_bordered json['log']['name'] else - print json['log']['name'].light_black + print json['log']['name'] end end @@ -56,7 +56,7 @@ def bind_event_handling(channel) # rubocop:disable Metrics/AbcSize, Metrics/Meth end def notify_started - title = "👀 Start watching #{@build.project_name} ##{@build.build_number}".light_black + title = "👀 Start watching #{@build.project_name} ##{@build.build_number}" say Printer::BuildPrinter.header_for(@build, title) end diff --git a/lib/circleci/cli/printer/build_printer.rb b/lib/circleci/cli/printer/build_printer.rb index 18a1d9d..7a8f8dd 100644 --- a/lib/circleci/cli/printer/build_printer.rb +++ b/lib/circleci/cli/printer/build_printer.rb @@ -5,12 +5,12 @@ module CLI module Printer class BuildPrinter class << self - def header_for(build, title) # rubocop:disable Metrics/AbcSize + def header_for(build, title) texts = [ - ['Project: '.light_black + build.project_name], - ['Build: '.light_black + build.build_number.to_s], - ['Author: '.light_black + build.author_name], - ['Workflow: '.light_black + "#{build.workflow_name}/#{build.workflow_job_name}"] + ['Project: ' + build.project_name], + ['Build: ' + build.build_number.to_s], + ['Author: ' + build.author_name], + ['Workflow: ' + "#{build.workflow_name}/#{build.workflow_job_name}"] ] Terminal::Table.new(title: title, rows: texts, style: { width: 120 }).to_s end