Class: Ocak::Commands::Resume

Inherits:
Dry::CLI::Command
  • Object
show all
Defined in:
lib/ocak/commands/resume.rb

Instance Method Summary collapse

Instance Method Details

#call(issue:, **options) ⇒ Object



24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/ocak/commands/resume.rb', line 24

def call(issue:, **options)
  config = Config.load
  issue_number = issue.to_i
  saved = load_state(config, issue_number)

  print_resume_info(issue_number, saved, config)

  if options[:dry_run]
    print_dry_run(saved, config)
    return
  end

  chdir = resolve_worktree(config, saved)
  run_resumed_pipeline(config, issue_number, saved, chdir, options)
rescue Config::ConfigNotFound => e
  warn "Error: #{e.message}"
  exit 1
end