Class: Dude::Commands::Tasks

Inherits:
Dry::CLI::Command
  • Object
show all
Defined in:
lib/dude/commands/tasks.rb

Instance Method Summary collapse

Instance Method Details

#callObject



10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/dude/commands/tasks.rb', line 10

def call
  tasks = Dude::ProjectManagement::Client.new.fetch_current_tasks
  lists = tasks.map(&:status).uniq

  lists.each do |list|
    puts "#{list}:".green.bold
    tasks.map do |issue|
      puts printable_issue_template(issue) if issue.status == list
    end
    puts "\n"
  end
end