class RepositoryMerger
Constants
- Branch
- Commit
- Tag
Attributes
configuration[R]
Public Class Methods
new(configuration)
click to toggle source
# File lib/repository_merger.rb, line 10 def initialize(configuration) @configuration = configuration end
Public Instance Methods
merge_commit_history_of(references, commit_message_conversion: nil, progress_title: nil)
click to toggle source
# File lib/repository_merger.rb, line 27 def merge_commit_history_of(references, commit_message_conversion: nil, progress_title: nil) commit_history_merger = CommitHistoryMerger.new( references, configuration: configuration, commit_message_conversion: commit_message_conversion, progress_title: progress_title ) commit_history_merger.run end
merge_commit_history_of_branches_named(original_branch_name, commit_message_conversion: nil, progress_title: nil)
click to toggle source
# File lib/repository_merger.rb, line 14 def merge_commit_history_of_branches_named(original_branch_name, commit_message_conversion: nil, progress_title: nil) original_branches = configuration.original_repos.map { |repo| repo.branch_for(original_branch_name) }.compact monorepo_head_commit = merge_commit_history_of( original_branches, commit_message_conversion: commit_message_conversion, progress_title: progress_title ) monorepo_branch_name = original_branches.first.local_name configuration.monorepo.create_or_update_branch(monorepo_branch_name, commit_id: monorepo_head_commit.id) end