Sha256: 79f59689646156cf1e222bb43fa4d83a1ec308d2efd1472f8ada542f4100fcc1

Contents?: true

Size: 938 Bytes

Versions: 23

Compression:

Stored size: 938 Bytes

Contents

#!/usr/bin/env ruby
# frozen_string_literal: true

require 'circleci/bundle/update/pr'
require 'optparse'

opt = OptionParser.new
options = { assignees: [] }
opt.on('-a', '--assignees alice,bob,carol', Array, 'Assign the PR to them') { |v| options[:assignees] = v.map(&:strip) }
opt.on('-r', '--reviewers alice,bob,carol', Array, 'Request PR review to them') { |v| options[:reviewers] = v.map(&:strip) }
opt.on('-l', '--labels "In Review, Update"', Array, 'Add labels to the PR') { |v| options[:labels] = v.map(&:strip) }
opt.on('-d', '--duplicate', 'Make PR even if it has already existed') { |v| options[:allow_dup_pr] = v }
opt.parse!(ARGV)

Circleci::Bundle::Update::Pr.create_if_needed(
  git_username: ARGV.shift,
  git_email: ARGV.shift,
  git_branches: ARGV.empty? ? %w[master main] : ARGV,
  assignees: options[:assignees],
  reviewers: options[:reviewers],
  labels: options[:labels],
  allow_dup_pr: !!options[:allow_dup_pr]
)

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
circleci-bundle-update-pr-5.0.10 bin/circleci-bundle-update-pr
circleci-bundle-update-pr-5.0.9 bin/circleci-bundle-update-pr
circleci-bundle-update-pr-5.0.8 bin/circleci-bundle-update-pr
circleci-bundle-update-pr-5.0.7 bin/circleci-bundle-update-pr
circleci-bundle-update-pr-5.0.6 bin/circleci-bundle-update-pr
circleci-bundle-update-pr-5.0.5 bin/circleci-bundle-update-pr
circleci-bundle-update-pr-5.0.4 bin/circleci-bundle-update-pr
circleci-bundle-update-pr-5.0.3 bin/circleci-bundle-update-pr
circleci-bundle-update-pr-5.0.2 bin/circleci-bundle-update-pr
circleci-bundle-update-pr-5.0.1 bin/circleci-bundle-update-pr
circleci-bundle-update-pr-5.0.0 bin/circleci-bundle-update-pr
circleci-bundle-update-pr-4.1.0 bin/circleci-bundle-update-pr
circleci-bundle-update-pr-4.0.9 bin/circleci-bundle-update-pr
circleci-bundle-update-pr-4.0.8 bin/circleci-bundle-update-pr
circleci-bundle-update-pr-4.0.7 bin/circleci-bundle-update-pr
circleci-bundle-update-pr-4.0.6 bin/circleci-bundle-update-pr
circleci-bundle-update-pr-4.0.5 bin/circleci-bundle-update-pr
circleci-bundle-update-pr-4.0.4 bin/circleci-bundle-update-pr
circleci-bundle-update-pr-4.0.3 bin/circleci-bundle-update-pr
circleci-bundle-update-pr-4.0.2 bin/circleci-bundle-update-pr