Module: OctoMerge

Defined in:
lib/octo_merge/merge_with_rebase.rb,
lib/octo_merge.rb,
lib/octo_merge/context.rb,
lib/octo_merge/execute.rb,
lib/octo_merge/version.rb,
lib/octo_merge/pull_request.rb,
lib/octo_merge/configuration.rb,
lib/octo_merge/abstract_merge.rb,
lib/octo_merge/list_pull_requests.rb,
lib/octo_merge/merge_without_rebase.rb,
lib/octo_merge/interactive_pull_requests.rb,
lib/octo_merge/merge_with_rebase_and_message.rb

Overview

Defined Under Namespace

Classes: AbstractMerge, Configuration, Context, Execute, InteractivePullRequests, ListPullRequests, MergeWithRebase, MergeWithRebaseAndMessage, MergeWithoutRebase, PullRequest

Constant Summary collapse

VERSION =
"0.3.0"

Class Method Summary collapse

Class Method Details

.configurationObject



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

def configuration
  @configuration ||= Configuration.new
end

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

Yields:



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

def configure
  @github_client = nil
  yield(configuration)
end

.github_clientObject



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

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

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



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

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