Method: GhIssues::CLI#all
- Defined in:
- lib/gh_issues/cli.rb
#all ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/gh_issues/cli.rb', line 42 def all ENV['GH_ISSUES_COLORIZE'] = '1' if [:color] sort_by = ['name', 'count'].include?([:sort_by]) ? [:sort_by] : 'name' sort_order = ['asc', 'desc'].include?([:sort_order]) ? [:sort_order] : 'asc' all_issues = GhIssues.all_issues if all_issues.count > 0 puts print_issue_list(all_issues, sort_by: sort_by, sort_order: sort_order) else puts "Hooray! You have no issue to display..." end end |