Class: Soba::Commands::Start

Inherits:
Object
  • Object
show all
Defined in:
lib/soba/commands/start.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(configuration: nil, issue_processor: nil) ⇒ Start

Returns a new instance of Start.



26
27
28
29
# File 'lib/soba/commands/start.rb', line 26

def initialize(configuration: nil, issue_processor: nil)
  @configuration = configuration
  @issue_processor = issue_processor
end

Instance Attribute Details

#configurationObject (readonly)

Returns the value of attribute configuration.



24
25
26
# File 'lib/soba/commands/start.rb', line 24

def configuration
  @configuration
end

#issue_processorObject (readonly)

Returns the value of attribute issue_processor.



24
25
26
# File 'lib/soba/commands/start.rb', line 24

def issue_processor
  @issue_processor
end

Instance Method Details

#execute(global_options, options, args) ⇒ Object



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/soba/commands/start.rb', line 31

def execute(global_options, options, args)
  # Handle deprecated --foreground option
  if options[:foreground]
    puts "DEPRECATED: The --foreground option is now the default behavior."
    puts "This option will be removed in a future version."
    options.delete(:foreground)
  end

  if args.empty?
    # ワークフロー実行モード(既存のworkflow runの動作)
    execute_workflow(global_options, options)
  else
    # 単一Issue実行モード(既存のworkflow execute_issueの動作)
    # 早期引数チェック(設定読み込み前)
    if args[0].blank? || args[0].strip.empty?
      warn "Error: Issue number is required"
      return 1
    end
    execute_issue(args, options)
  end
end