Sha256: 2985ed828a35513543a162d243654be679482c2e5efc8359d93d4720d07719e3

Contents?: true

Size: 933 Bytes

Versions: 8

Compression:

Stored size: 933 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? ? ['master'] : ARGV,
  assignees: options[:assignees],
  reviewers: options[:reviewers],
  labels: options[:labels],
  allow_dup_pr: !!options[:allow_dup_pr]
)

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
circleci-bundle-update-pr-3.0.0 bin/circleci-bundle-update-pr
circleci-bundle-update-pr-2.1.0 bin/circleci-bundle-update-pr
circleci-bundle-update-pr-2.0.0 bin/circleci-bundle-update-pr
circleci-bundle-update-pr-1.19.1 bin/circleci-bundle-update-pr
circleci-bundle-update-pr-1.19.0 bin/circleci-bundle-update-pr
circleci-bundle-update-pr-1.17.0 bin/circleci-bundle-update-pr
circleci-bundle-update-pr-1.16.1 bin/circleci-bundle-update-pr
circleci-bundle-update-pr-1.16.0 bin/circleci-bundle-update-pr