Class: Thegarage::Gitx::Cli::IntegrateCommand

Inherits:
BaseCommand show all
Includes:
Github
Defined in:
lib/thegarage/gitx/cli/integrate_command.rb

Constant Summary

Constants included from Github

Github::CLIENT_URL, Github::GLOBAL_CONFIG_FILE, Github::PULL_REQUEST_FOOTER, Github::REVIEW_CONTEXT

Instance Method Summary collapse

Methods included from Github

#ask_without_echo, #authorization_token, #branch_status, #create_authorization, #create_pull_request, #find_or_create_pull_request, #find_pull_request, #github_client, #github_client_name, #github_organization, #github_slug, #global_config, #global_config_file, #pull_request_body, #save_global_config, #update_review_status, #username

Methods inherited from BaseCommand

#initialize

Methods included from Thor::Actions

#ask_editor, #run_cmd

Constructor Details

This class inherits a constructor from Thegarage::Gitx::Cli::BaseCommand

Instance Method Details

#integrate(integration_branch = 'staging') ⇒ Object



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/thegarage/gitx/cli/integrate_command.rb', line 14

def integrate(integration_branch = 'staging')
  assert_aggregate_branch!(integration_branch)

  branch = feature_branch_name
  print_message(branch, integration_branch)

  begin
    execute_command(UpdateCommand, :update)
  rescue
    fail MergeError, "Merge Conflict Occurred. Please Merge Conflict Occurred. Please fix merge conflict and rerun the integrate command"
  end

  integrate_branch(branch, integration_branch) unless options[:resume]
  checkout_branch branch

  create_integrate_comment(branch) unless config.reserved_branch?(branch)
end