Class: OctoMerge::MergeWithoutRebase

Inherits:
AbstractMerge show all
Defined in:
lib/octo_merge/merge_without_rebase.rb

Instance Attribute Summary

Attributes inherited from AbstractMerge

#pull_requests, #working_directory

Instance Method Summary collapse

Methods inherited from AbstractMerge

#initialize, run

Constructor Details

This class inherits a constructor from OctoMerge::AbstractMerge

Instance Method Details

#runObject



3
4
5
6
7
8
9
10
11
12
13
# File 'lib/octo_merge/merge_without_rebase.rb', line 3

def run
  git.checkout(master)
  git.fetch(upstream)
  git.reset_hard("#{upstream}/#{master}")

  pull_requests.each do |pull_request|
    git.remote_add("#{pull_request.remote} #{pull_request.remote_url}")
    git.fetch(pull_request.remote)
    git.merge_no_ff("#{pull_request.remote}/#{pull_request.branch}")
  end
end