Class: Geet::Services::ListIssues
- Inherits:
-
Object
- Object
- Geet::Services::ListIssues
- Includes:
- Geet::Shared::Selection
- Defined in:
- lib/geet/services/list_issues.rb
Constant Summary
Constants included from Geet::Shared::Selection
Geet::Shared::Selection::MANUAL_LIST_SELECTION_FLAG, Geet::Shared::Selection::SELECTION_MULTIPLE, Geet::Shared::Selection::SELECTION_SINGLE, Geet::Shared::Selection::SKIP_LIST_SELECTION_FLAG
Instance Method Summary collapse
- #execute(assignee: nil) ⇒ Object
-
#initialize(repository, out: $stdout) ⇒ ListIssues
constructor
A new instance of ListIssues.
Constructor Details
#initialize(repository, out: $stdout) ⇒ ListIssues
Returns a new instance of ListIssues.
11 12 13 14 |
# File 'lib/geet/services/list_issues.rb', line 11 def initialize(repository, out: $stdout) @repository = repository @out = out end |
Instance Method Details
#execute(assignee: nil) ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/geet/services/list_issues.rb', line 16 def execute(assignee: nil, **) selected_assignee = find_and_select_attributes(assignee) if assignee issues = @repository.issues(assignee: selected_assignee) issues.each do |issue| @out.puts "#{issue.number}. #{issue.title} (#{issue.link})" end end |