Class: SpaceArchitect::CLI::Architect::Merge

Inherits:
Dry::CLI::Command
  • Object
show all
Includes:
GlobalOptions, Helpers
Defined in:
lib/space_architect/cli/architect.rb

Instance Method Summary collapse

Methods included from Helpers

#display_date, #handle_errors, #project_config, #render, #setup_terminal, #state, #store, #terminal

Methods included from GlobalOptions

included

Instance Method Details

#call(iteration:, lane:, space: nil, message: nil, **opts) ⇒ Object



280
281
282
283
284
285
286
287
288
289
290
291
292
# File 'lib/space_architect/cli/architect.rb', line 280

def call(iteration:, lane:, space: nil, message: nil, **opts)
  setup_terminal(**opts.slice(:color, :colors))
  handle_errors do
    render(store.find(space)) do |sp|
      mission = ArchitectMission.new(space: sp)
      r = mission.merge_lane!(iteration, lane, message: message)
      terminal.say "Merged #{lane}#{r[:integration_branch]} (#{r[:merge_sha][0, 8]})"
      terminal.say r[:diffstat] unless r[:diffstat].empty?
      terminal.say "Gates NOT run — run `architect gate #{iteration}` against the integration branch."
      CLI.record_outcome(Outcome.new(exit_code: 0))
    end
  end
end