Class: Cli
- Inherits:
-
Thor
- Object
- Thor
- Cli
- Defined in:
- lib/cli.rb
Instance Method Summary collapse
Instance Method Details
#remain_pull_requests ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/cli.rb', line 20 def remain_pull_requests repo_list = .repos || REPOS client = connector() repo_list = client.list_repos(.user).map(&:full_name) if repo_list.empty? && .user results = ResponCore::PullRequests::RemainRequests.new(repo_list: repo_list, reviewers: .reviewers, client: client, pr_count: .pr_count).execute system('clear') puts '' if .json? pp results else puts ResponCore::Formatters::Cli::PullRequests::RemainRequests.format(results, display_url: .display_url) end end |
#reviews_efficiency ⇒ Object
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/cli.rb', line 45 def reviews_efficiency repo_list = .repos || REPOS client = connector() repo_list = client.list_repos(.user).map(&:full_name) if repo_list.empty? && .user results = ResponCore::PullRequests::ReviewsEfficiency.new(repo_list: repo_list, reviewers: .reviewers, client: client, pr_count: .pr_count).execute system('clear') puts '' if .json? pp results else puts ResponCore::Formatters::Cli::PullRequests::ReviewsEfficiency.format(results, display_url: .display_url) end end |
#shuffle_requests_reviewer ⇒ Object
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/cli.rb', line 72 def shuffle_requests_reviewer repo_list = .repos || REPOS client = connector() results = ResponCore::PullRequests::ShuffleRequestReviewer.new(repo_list: repo_list, client: client, pr_count: .pr_count, pull_requests: .pull_requests, reviewers: .reviewers, exclude_reviewers: .exclude_reviewers, mode: .mode).execute if .json? pp results else results.each do |record| record.each do |repo, result| puts "assigne reviewer for #{repo}" puts ResponCore::Formatters::Cli::PullRequests::RemainRequests.format(result, display_url: .display_url) end end end end |