Class: Githu3::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/githu3/cli.rb

Instance Method Summary collapse

Instance Method Details

#issues(repo_name) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
# File 'lib/githu3/cli.rb', line 11

def issues repo_name
  client = Githu3::Client.new
  begin
    repo = client.repo(repo_name)
    repo.issues.map do |issue|
      puts [issue.number.to_s.ljust(5), issue.assignee.to_s.ljust(25), issue.title.to_s].join("\t|\t")
    end
  rescue => err
    puts "Error: #{err.class.name}"
  end
end