Module: OctoMerge

Defined in:
lib/octo_merge/strategy/base.rb,
lib/octo_merge.rb,
lib/octo_merge/cli.rb,
lib/octo_merge/context.rb,
lib/octo_merge/execute.rb,
lib/octo_merge/options.rb,
lib/octo_merge/version.rb,
lib/octo_merge/strategy.rb,
lib/octo_merge/cli/parser.rb,
lib/octo_merge/pull_request.rb,
lib/octo_merge/configuration.rb,
lib/octo_merge/strategy/rebase.rb,
lib/octo_merge/list_pull_requests.rb,
lib/octo_merge/interactive_pull_requests.rb,
lib/octo_merge/strategy/merge_with_rebase.rb,
lib/octo_merge/strategy/merge_without_rebase.rb,
lib/octo_merge/strategy/merge_with_rebase_and_message.rb

Overview

Defined Under Namespace

Modules: Strategy Classes: CLI, Configuration, Context, Execute, InteractivePullRequests, ListPullRequests, Options, PullRequest

Constant Summary collapse

VERSION =
"0.6.0"

Class Method Summary collapse

Class Method Details

.configurationObject



32
33
34
# File 'lib/octo_merge.rb', line 32

def configuration
  @configuration ||= Configuration.new
end

.configure {|configuration| ... } ⇒ Object

Yields:



27
28
29
30
# File 'lib/octo_merge.rb', line 27

def configure
  @github_client = nil
  yield(configuration)
end

.github_clientObject



36
37
38
39
40
41
# File 'lib/octo_merge.rb', line 36

def github_client
  @github_client ||= Octokit::Client.new(
    login: configuration.,
    password: configuration.password
  )
end

.run(repo:, pull_request_numbers:, working_directory:, strategy:) ⇒ Object



17
18
19
20
21
22
23
24
25
# File 'lib/octo_merge.rb', line 17

def run(repo:, pull_request_numbers:, working_directory:, strategy:)
  context = Context.new(
    working_directory: working_directory,
    repo: repo,
    pull_request_numbers: pull_request_numbers
  )

  Execute.new(context: context, strategy: strategy).run
end