Class: GithubCLI::Commands::Labels
- Inherits:
-
GithubCLI::Command
- Object
- Thor
- GithubCLI::Command
- GithubCLI::Commands::Labels
- Defined in:
- lib/github_cli/commands/labels.rb
Constant Summary
Constants inherited from GithubCLI::Command
GithubCLI::Command::ALIASES, GithubCLI::Command::API_CLASSES, GithubCLI::Command::HELP_COMMAND
Constants inherited from Thor
Thor::DynamicTask, Thor::HELP_MAPPINGS, Thor::HiddenTask, Thor::MANPAGES, Thor::THOR_RESERVED_WORDS, Thor::Task, Thor::UndefinedTaskError, Thor::VERSION
Instance Attribute Summary
Attributes included from Thor::Actions
Attributes included from Thor::Base
#args, #options, #parent_options
Instance Method Summary collapse
- #add(user, repo, number, *args) ⇒ Object
- #create(user, repo) ⇒ Object
- #delete(user, repo, name) ⇒ Object
- #get(user, repo, name) ⇒ Object
- #list(user, repo) ⇒ Object
- #remove(user, repo, number) ⇒ Object
- #replace(user, repo, number, *args) ⇒ Object
- #update(user, repo, name) ⇒ Object
Methods inherited from GithubCLI::Command
all, api, banner, command_to_show, extract_namespace, is_api_command?, output_formats
Methods included from Thor::Actions
#action, #append_to_file, #apply, #chmod, #comment_lines, #copy_file, #create_file, #create_link, #destination_root, #destination_root=, #directory, #empty_directory, #find_in_source_paths, #gsub_file, #in_root, included, #initialize, #inject_into_class, #insert_into_file, #inside, #link_file, #prepend_to_file, #relative_to_original_destination_root, #remove_file, #run, #run_ruby_script, #source_paths, #template, #thor, #uncomment_lines
Methods inherited from Thor
check_unknown_options!, check_unknown_options?, command_help, default_command, desc, global_flags, handle_no_task_error, help, #help, long_desc, map, method_option, method_options, printable_commands, register, stop_on_unknown_option!, stop_on_unknown_option?, subcommand, subcommands
Methods included from Thor::Base
included, #initialize, register_klass_file, shell, shell=, subclass_files, subclasses
Instance Method Details
#add(user, repo, number, *args) ⇒ Object
51 52 53 |
# File 'lib/github_cli/commands/labels.rb', line 51 def add(user, repo, number, *args) Label.add user, repo, number, args, [:params], [:format] end |
#create(user, repo) ⇒ Object
36 37 38 |
# File 'lib/github_cli/commands/labels.rb', line 36 def create(user, repo) Label.create user, repo, [:params], [:format] end |
#delete(user, repo, name) ⇒ Object
46 47 48 |
# File 'lib/github_cli/commands/labels.rb', line 46 def delete(user, repo, name) Label.delete user, repo, name, [:params], [:format] end |
#get(user, repo, name) ⇒ Object
26 27 28 |
# File 'lib/github_cli/commands/labels.rb', line 26 def get(user, repo, name) Label.get user, repo, name, [:params], [:format] end |
#list(user, repo) ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/github_cli/commands/labels.rb', line 15 def list(user, repo) params = [:params].dup if (milestone_id = [:milestone]) params['milestone_id'] = milestone_id elsif (issue_id = [:issue]) params['issue_id'] = issue_id end Label.all user, repo, params, [:format] end |
#remove(user, repo, number) ⇒ Object
56 57 58 59 |
# File 'lib/github_cli/commands/labels.rb', line 56 def remove(user, repo, number) name, number = Arguments.new(number).parse Label.remove user, repo, number, name, [:params], [:format] end |