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