Class: Geet::Services::CloseMilestones

Inherits:
Object
  • Object
show all
Includes:
Geet::Shared::Selection
Defined in:
lib/geet/services/close_milestones.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

Constructor Details

#initialize(repository, out: $stdout) ⇒ CloseMilestones

Returns a new instance of CloseMilestones.



10
11
12
13
# File 'lib/geet/services/close_milestones.rb', line 10

def initialize(repository, out: $stdout)
  @repository = repository
  @out = out
end

Instance Method Details

#execute(numbers: nil) ⇒ Object



15
16
17
18
19
20
21
# File 'lib/geet/services/close_milestones.rb', line 15

def execute(numbers: nil)
  numbers = find_and_select_milestone_numbers(numbers)

  close_milestone_threads = close_milestones(numbers)

  close_milestone_threads.each(&:join)
end