Sha256: 93f8a02207495b44da5ec9be53d6d804bdf0463ac470d5627dda1b3d8b465e17

Contents?: true

Size: 1.17 KB

Versions: 3

Compression:

Stored size: 1.17 KB

Contents

#!/usr/bin/env ruby

require "bundler/inline"
gemfile do
  source "https://rubygems.org"
  gem "multi_repo", require: "multi_repo/cli", path: File.expand_path("..", __dir__)
  gem "more_core_extensions"
end
require "more_core_extensions/core_ext/array/tableize"

opts = Optimist.options do
  synopsis "Create a pull request on all repos."

  opt :base,    "The target branch for the changes.",                         :type => :string, :required => true
  opt :head,    "The name of the branch to create on your fork.",             :type => :string, :required => true
  opt :script,  "The path to the script that will update the desired files.", :type => :string, :required => true
  opt :message, "The commit message for this change.",                        :type => :string, :required => true
  opt :title,   "The PR title for this change. (default is --message)",       :type => :string

  MultiRepo::CLI.common_options(self)
end

results = {}
begin
  MultiRepo::CLI.each_repo(**opts) do |repo|
    results[repo.name] = MultiRepo::Helpers::PullRequestBlasterOuter.new(repo, **opts).blast
  end
ensure
  puts "Summary:"
  puts results.to_a.tableize(:header => false) unless results.empty?
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
multi_repo-0.5.0 scripts/pull_request_blaster_outer
multi_repo-0.4.0 scripts/pull_request_blaster_outer
multi_repo-0.3.1 scripts/pull_request_blaster_outer