lib/neetob/cli/github/labels/commands.rb in neetob-0.2.3 vs lib/neetob/cli/github/labels/commands.rb in neetob-0.2.4

- old
+ new

@@ -14,55 +14,51 @@ class CLI module Github module Labels class Commands < SubCommandBase class_option :repos, - type: :array, aliases: "-r", - desc: "Github repo names. Can be matched using the '*' wildcard. Example: \"neeto*\" \"neeto-cal-web\"" - class_option :all_neeto_repos, - type: :boolean, aliases: "--all", default: false, - desc: "Use this flag for working with all neeto repos" + type: :array, aliases: "-r", required: true, + desc: "Github repo names. Can be matched using the '*' wildcard. Example: \"neeto*\" \"neeto-cal-web\", also providing \"all\" as value matches all neeto repos." desc "list", "List all the labels in the Github repos" def list - List.new(options[:repos], options[:sandbox], options[:all_neeto_repos]).run + List.new(options[:repos], options[:sandbox]).run end desc "show", "Show details about the given label in the Github repos" option :name, type: :string, aliases: "-n", required: true, desc: "Name of the label" def show - Show.new(options[:repos], options[:name], options[:sandbox], options[:all_neeto_repos]).run + Show.new(options[:repos], options[:name], options[:sandbox]).run end desc "upsert", "Create and update labels in the Github repos" option :path, type: :string, aliases: "-p", desc: "The JSON file path which has a list of all the required labels. Each label should have name. The color and description are optional" option :name, type: :string, desc: "Name of the label you want to upsert" option :color, type: :string, desc: "Color of the label you want to upsert" option :description, type: :string, desc: "Description of the label you want to upsert" def upsert Upsert.new( - options[:repos], options[:path], options[:sandbox], options[:all_neeto_repos], options[:name], + options[:repos], options[:path], options[:sandbox], options[:name], options[:color], options[:description]).run end desc "delete_all", "Delete all the labels from the Github repos" def delete_all - DeleteAll.new(options[:repos], options[:sandbox], options[:all_neeto_repos]).run + DeleteAll.new(options[:repos], options[:sandbox]).run end desc "delete", "Delete some labels from the Github repos" option :labels, type: :array, required: true, desc: "Labels you want to delete from the repos." def delete - Delete.new(options[:repos], options[:labels], options[:sandbox], options[:all_neeto_repos]).run + Delete.new(options[:repos], options[:labels], options[:sandbox]).run end desc "update", "Update a label name in Github repos" option :old_name, type: :string, required: true, desc: "Current label name which needs to be updated" option :new_name, type: :string, required: true, desc: "New name for the updated label" def update Update.new( - options[:repos], options[:old_name], options[:new_name], options[:sandbox], - options[:all_neeto_repos]).run + options[:repos], options[:old_name], options[:new_name], options[:sandbox]).run end end end end end