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
-
#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.
-
#repos ⇒ Object
Returns the value of attribute repos.
-
#sandbox ⇒ Object
Returns the value of attribute sandbox.
Attributes inherited from Base
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(repos, issue_title, issue_description = "", issue_assignee = "", issue_labels = "", sandbox = false) ⇒ Create
constructor
A new instance of Create.
- #run ⇒ Object
Methods included from Utils
#camel_case_to_slug, #is_upper?, #symbolize_keys
Constructor Details
#initialize(repos, 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 24 |
# File 'lib/neetob/cli/github/issues/create.rb', line 14 def initialize(repos, issue_title, issue_description = "", issue_assignee = "", issue_labels = "", sandbox = false) super() @repos = repos @issue_title = issue_title @issue_description = issue_description @issue_assignee = issue_assignee @issue_labels = issue_labels @sandbox = sandbox get_issue_title_or_description_and_confirm_data end |
Instance Attribute Details
#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 |
#repos ⇒ Object
Returns the value of attribute repos.
12 13 14 |
# File 'lib/neetob/cli/github/issues/create.rb', line 12 def repos @repos 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
26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/neetob/cli/github/issues/create.rb', line 26 def run matching_repos = find_all_matching_apps_or_repos(repos, :github, sandbox) matching_repos.each do |repo| ui.info("\nCreating issue in \"#{repo}\" \n") begin = { assignee: issue_assignee, labels: issue_labels } issue = client.create_issue(repo, issue_title, issue_description, ) ui.success("Created the issue successfully \nLink: #{issue[:html_url]}") rescue StandardError => e ExceptionHandler.new(e).process end end end |