Class: Neetob::CLI::Github::Issues::List
- Includes:
- ActionView::Helpers::DateHelper
- Defined in:
- lib/neetob/cli/github/issues/list.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary collapse
-
#apps ⇒ Object
Returns the value of attribute apps.
-
#issue_assignee ⇒ Object
Returns the value of attribute issue_assignee.
-
#issue_label ⇒ Object
Returns the value of attribute issue_label.
-
#issue_search_query ⇒ Object
Returns the value of attribute issue_search_query.
-
#issue_state ⇒ Object
Returns the value of attribute issue_state.
-
#sandbox ⇒ Object
Returns the value of attribute sandbox.
-
#show_issues_count ⇒ Object
Returns the value of attribute show_issues_count.
Attributes inherited from Base
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(apps, issue_assignee = "", issue_state = "open", issue_search_query = "", show_issues_count = false, issue_label = "", sandbox = false) ⇒ List
constructor
A new instance of List.
- #run ⇒ Object
Methods inherited from Base
#check_for_apps_and_all_neeto_repos_option
Methods included from Utils
#camel_case_to_slug, #is_upper?, #symbolize_keys
Constructor Details
#initialize(apps, issue_assignee = "", issue_state = "open", issue_search_query = "", show_issues_count = false, issue_label = "", sandbox = false) ⇒ List
Returns a new instance of List.
18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/neetob/cli/github/issues/list.rb', line 18 def initialize(apps, issue_assignee = "", issue_state = "open", issue_search_query = "", show_issues_count = false, issue_label = "", sandbox = false) super() @apps = apps @issue_state = issue_state @issue_assignee = issue_assignee @show_issues_count = show_issues_count @issue_search_query = issue_search_query @issue_label = issue_label @sandbox = sandbox end |
Instance Attribute Details
#apps ⇒ Object
Returns the value of attribute apps.
15 16 17 |
# File 'lib/neetob/cli/github/issues/list.rb', line 15 def apps @apps end |
#issue_assignee ⇒ Object
Returns the value of attribute issue_assignee.
15 16 17 |
# File 'lib/neetob/cli/github/issues/list.rb', line 15 def issue_assignee @issue_assignee end |
#issue_label ⇒ Object
Returns the value of attribute issue_label.
15 16 17 |
# File 'lib/neetob/cli/github/issues/list.rb', line 15 def issue_label @issue_label end |
#issue_search_query ⇒ Object
Returns the value of attribute issue_search_query.
15 16 17 |
# File 'lib/neetob/cli/github/issues/list.rb', line 15 def issue_search_query @issue_search_query end |
#issue_state ⇒ Object
Returns the value of attribute issue_state.
15 16 17 |
# File 'lib/neetob/cli/github/issues/list.rb', line 15 def issue_state @issue_state end |
#sandbox ⇒ Object
Returns the value of attribute sandbox.
15 16 17 |
# File 'lib/neetob/cli/github/issues/list.rb', line 15 def sandbox @sandbox end |
#show_issues_count ⇒ Object
Returns the value of attribute show_issues_count.
15 16 17 |
# File 'lib/neetob/cli/github/issues/list.rb', line 15 def show_issues_count @show_issues_count end |
Instance Method Details
#run ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/neetob/cli/github/issues/list.rb', line 31 def run matching_apps = find_all_matching_apps(apps, :github, sandbox) matching_apps.each do |app| ui.info("\n Issues of #{app} \n") begin issues = client.search_issues((app)) ui.info("There are #{issues[:total_count]} issues with matching query") if show_issues_count table_rows = create_table(issues[:items]) table = Terminal::Table.new headings: table_columns, rows: table_rows ui.success(table) rescue StandardError => e ExceptionHandler.new(e).process end end end |