Class: Neetob::CLI::Github::Issues::Create
- Defined in:
- lib/neetob/cli/github/issues/create.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary collapse
-
#apps ⇒ Object
Returns the value of attribute apps.
-
#issue_assignee ⇒ Object
Returns the value of attribute issue_assignee.
-
#issue_description ⇒ Object
Returns the value of attribute issue_description.
-
#issue_labels ⇒ Object
Returns the value of attribute issue_labels.
-
#issue_title ⇒ Object
Returns the value of attribute issue_title.
-
#sandbox ⇒ Object
Returns the value of attribute sandbox.
Attributes inherited from Base
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(apps, issue_title, issue_description = "", issue_assignee = "", issue_labels = "", sandbox = false) ⇒ Create
constructor
A new instance of Create.
- #run ⇒ Object
Methods inherited from Base
#check_for_apps_and_all_neeto_repos_option
Methods included from Utils
#camel_case_to_slug, #is_upper?, #symbolize_keys
Constructor Details
#initialize(apps, issue_title, issue_description = "", issue_assignee = "", issue_labels = "", sandbox = false) ⇒ Create
Returns a new instance of Create.
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/neetob/cli/github/issues/create.rb', line 14 def initialize(apps, issue_title, issue_description = "", issue_assignee = "", issue_labels = "", sandbox = false) super() @apps = apps @issue_title = issue_title @issue_description = issue_description @issue_assignee = issue_assignee @issue_labels = issue_labels @sandbox = sandbox end |
Instance Attribute Details
#apps ⇒ Object
Returns the value of attribute apps.
12 13 14 |
# File 'lib/neetob/cli/github/issues/create.rb', line 12 def apps @apps end |
#issue_assignee ⇒ Object
Returns the value of attribute issue_assignee.
12 13 14 |
# File 'lib/neetob/cli/github/issues/create.rb', line 12 def issue_assignee @issue_assignee end |
#issue_description ⇒ Object
Returns the value of attribute issue_description.
12 13 14 |
# File 'lib/neetob/cli/github/issues/create.rb', line 12 def issue_description @issue_description end |
#issue_labels ⇒ Object
Returns the value of attribute issue_labels.
12 13 14 |
# File 'lib/neetob/cli/github/issues/create.rb', line 12 def issue_labels @issue_labels end |
#issue_title ⇒ Object
Returns the value of attribute issue_title.
12 13 14 |
# File 'lib/neetob/cli/github/issues/create.rb', line 12 def issue_title @issue_title end |
#sandbox ⇒ Object
Returns the value of attribute sandbox.
12 13 14 |
# File 'lib/neetob/cli/github/issues/create.rb', line 12 def sandbox @sandbox end |
Instance Method Details
#run ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/neetob/cli/github/issues/create.rb', line 25 def run matching_apps = find_all_matching_apps(apps, :github, sandbox) matching_apps.each do |app| ui.info("\n Creating issue in \"#{app}\" \n") begin = { assignee: issue_assignee, labels: issue_labels } issue = client.create_issue(app, issue_title, issue_description, ) ui.success("Created the issue successfully \nLink: #{issue[:html_url]}") rescue StandardError => e ExceptionHandler.new(e).process end end end |