Sha256: 694504553510d0fd2c0d5f5e7bf9454aefbaf0411db74c23b4039c0f6a1aaf8d
Contents?: true
Size: 729 Bytes
Versions: 6
Compression:
Stored size: 729 Bytes
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__) end opts = Optimist.options do synopsis "Update the branch protection for all GitHub repos." opt :branch, "The branch to protect.", :type => :string, :required => true MultiRepo::CLI.common_options(self, :repo_set_default => nil) end opts[:repo_set] = opts[:branch] unless opts[:repo] || opts[:repo_set] MultiRepo::CLI.repos_for(**opts).each do |repo| next if opts[:branch] != "master" && repo.config.has_real_releases puts MultiRepo::CLI.header(repo.name) MultiRepo::Helpers::UpdateBranchProtection.new(repo.name, **opts).run puts end
Version data entries
6 entries across 6 versions & 1 rubygems