lib/neetob/cli/github/labels/commands.rb in neetob-0.2.2 vs lib/neetob/cli/github/labels/commands.rb in neetob-0.2.3
- old
+ new
@@ -13,55 +13,55 @@
module Neetob
class CLI
module Github
module Labels
class Commands < SubCommandBase
- class_option :apps,
- type: :array, aliases: "-a",
- desc: "Github app names. Can be matched using the '*' wildcard. Example: \"neeto*\" \"neeto-cal-web\""
+ 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"
desc "list", "List all the labels in the Github repos"
def list
- List.new(options[:apps], options[:sandbox], options[:all_neeto_repos]).run
+ List.new(options[:repos], options[:sandbox], options[:all_neeto_repos]).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[:apps], options[:name], options[:sandbox], options[:all_neeto_repos]).run
+ Show.new(options[:repos], options[:name], options[:sandbox], options[:all_neeto_repos]).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[:apps], options[:path], options[:sandbox], options[:all_neeto_repos], options[:name],
+ options[:repos], options[:path], options[:sandbox], options[:all_neeto_repos], 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[:apps], options[:sandbox], options[:all_neeto_repos]).run
+ DeleteAll.new(options[:repos], options[:sandbox], options[:all_neeto_repos]).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[:apps], options[:labels], options[:sandbox], options[:all_neeto_repos]).run
+ Delete.new(options[:repos], options[:labels], options[:sandbox], options[:all_neeto_repos]).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[:apps], options[:old_name], options[:new_name], options[:sandbox],
+ options[:repos], options[:old_name], options[:new_name], options[:sandbox],
options[:all_neeto_repos]).run
end
end
end
end