Sha256: 68ce6f4975aa028449609583a8ef85ac41fd4bf64caf199d9274aa85bde93838

Contents?: true

Size: 1.9 KB

Versions: 2

Compression:

Stored size: 1.9 KB

Contents

# frozen_string_literal: true

require "thor"

require_relative "compliance_fix"
require_relative "script"
require_relative "../../sub_command_base"

module Neetob
  class CLI
    module Github
      module MakePr
        class Commands < SubCommandBase
          class_option :repos, type: :array, aliases: "-r", default: ["*"],
            desc: "Github repo names. Can be matched using the '*' wildcard. Example: \"neeto*\" \"neeto-cal-web\""
          class_option :nanos, type: :boolean, aliases: "-n", default: false,
            desc: "Use this flag to make PRs for the neeto gems"
          class_option :labels, type: :string, default: "",
            desc: "Labels you want to add in the PRs. Example: --labels \"bug,priority\""

          desc "compliance-fix", "Create PRs for fixing neeto compliance in all products"
          def compliance_fix
            ComplianceFix.new(options[:repos], options[:nanos], options[:sandbox], options[:labels]).run
          end

          desc "script", "Create PRs after running the given script for each product."
          option :path, type: :string, aliases: "-p",
            desc: "Path to UNIX executable script which will be run for each product", required: true
          option :title, type: :string, aliases: "-t", desc: "Title for the PR"
          option :branch, type: :string, aliases: "-b", desc: "Feature branch name for the PR"
          option :description, type: :string, aliases: "-d", desc: "Description of the PR"
          option :frontend_packages, type: :boolean, aliases: "-f", default: false, desc: "Use this flag to make PRs for the neeto frontend packages"
          def script
            Script.new(
              options[:repos], options[:path], options[:title], options[:branch], options[:description],
              options[:nanos], options[:frontend_packages], options[:sandbox], options[:labels]).run
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
neetob-0.4.6 lib/neetob/cli/github/make_pr/commands.rb
neetob-0.4.5 lib/neetob/cli/github/make_pr/commands.rb