Class: GithubCLI::Commands::PullRequests
Constant Summary
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
#behavior
Attributes included from Thor::Base
#args, #options, #parent_options
Instance Method Summary
collapse
-
#commits(user, repo, number) ⇒ Object
-
#create(user, repo) ⇒ Object
-
#files(user, repo, number) ⇒ Object
-
#get(user, repo, number) ⇒ Object
-
#list(user, repo) ⇒ Object
-
#merge(user, repo, number) ⇒ Object
-
#merged(user, repo, number) ⇒ Object
-
#update(user, repo, number) ⇒ Object
all, api, banner, command_to_show, extract_namespace, is_api_command?, output_formats
#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
#commits(user, repo, number) ⇒ Object
51
52
53
|
# File 'lib/github_cli/commands/pull_requests.rb', line 51
def commits(user, repo, number)
PullRequest.commits user, repo, number, options[:params], options[:format]
end
|
#create(user, repo) ⇒ Object
27
28
29
30
31
32
33
34
35
|
# File 'lib/github_cli/commands/pull_requests.rb', line 27
def create(user, repo)
params = options[:params].dup
params['title'] = options[:title] if options[:title]
params['body'] = options[:body] if options[:body]
params['base'] = options[:base] if options[:base]
params['head'] = options[:head] if options[:head]
params['issue'] = options[:issue] if options[:issue]
PullRequest.create user, repo, params, options[:format]
end
|
#files(user, repo, number) ⇒ Object
56
57
58
|
# File 'lib/github_cli/commands/pull_requests.rb', line 56
def files(user, repo, number)
PullRequest.files user, repo, number, options[:params], options[:format]
end
|
#get(user, repo, number) ⇒ Object
14
15
16
|
# File 'lib/github_cli/commands/pull_requests.rb', line 14
def get(user, repo, number)
PullRequest.get user, repo, number, options[:params], options[:format]
end
|
#list(user, repo) ⇒ Object
9
10
11
|
# File 'lib/github_cli/commands/pull_requests.rb', line 9
def list(user, repo)
PullRequest.list user, repo, options[:params], options[:format]
end
|
#merge(user, repo, number) ⇒ Object
66
67
68
|
# File 'lib/github_cli/commands/pull_requests.rb', line 66
def merge(user, repo, number)
PullRequest.merge user, repo, number, options[:params], options[:format]
end
|
#merged(user, repo, number) ⇒ Object
61
62
63
|
# File 'lib/github_cli/commands/pull_requests.rb', line 61
def merged(user, repo, number)
PullRequest.merged user, repo, number, options[:params], options[:format]
end
|
#update(user, repo, number) ⇒ Object
42
43
44
45
46
47
48
|
# File 'lib/github_cli/commands/pull_requests.rb', line 42
def update(user, repo, number)
params = options[:params].dup
params['title'] = options[:title] if options[:title]
params['body'] = options[:body] if options[:body]
params['state'] = options[:state] if options[:state]
PullRequest.update user, repo, number, params, options[:format]
end
|