lib/neetob/cli/github/issues/create.rb in neetob-0.2.2 vs lib/neetob/cli/github/issues/create.rb in neetob-0.2.3
- old
+ new
@@ -7,29 +7,29 @@
module Neetob
class CLI
module Github
module Issues
class Create < Base
- attr_accessor :apps, :issue_title, :issue_description, :issue_assignee, :issue_labels, :sandbox
+ attr_accessor :repos, :issue_title, :issue_description, :issue_assignee, :issue_labels, :sandbox
- def initialize(apps, issue_title, issue_description = "", issue_assignee = "", issue_labels = "",
+ def initialize(repos, issue_title, issue_description = "", issue_assignee = "", issue_labels = "",
sandbox = false)
super()
- @apps = apps
+ @repos = repos
@issue_title = issue_title
@issue_description = issue_description
@issue_assignee = issue_assignee
@issue_labels = issue_labels
@sandbox = sandbox
end
def run
- matching_apps = find_all_matching_apps(apps, :github, sandbox)
- matching_apps.each do |app|
- ui.info("\n Creating issue in \"#{app}\" \n")
+ matching_repos = find_all_matching_apps_or_repos(repos, :github, sandbox)
+ matching_repos.each do |repo|
+ ui.info("\n Creating issue in \"#{repo}\" \n")
begin
issue_options = { assignee: issue_assignee, labels: issue_labels }
- issue = client.create_issue(app, issue_title, issue_description, issue_options)
+ issue = client.create_issue(repo, issue_title, issue_description, issue_options)
ui.success("Created the issue successfully \nLink: #{issue[:html_url]}")
rescue StandardError => e
ExceptionHandler.new(e).process
end
end