Class: GithubIssueCreation
- Inherits:
-
Neetob::CLI::Github::Base
- Object
- Neetob::CLI::Base
- Neetob::CLI::Github::Base
- GithubIssueCreation
- Defined in:
- lib/neetob/cli/monthly_audit/github_issue_creation.rb
Constant Summary
Constants inherited from Neetob::CLI::Base
Neetob::CLI::Base::NEETO_APPS_LIST_LINK
Instance Attribute Summary
Attributes inherited from Neetob::CLI::Github::Base
Attributes inherited from Neetob::CLI::Base
Instance Method Summary collapse
- #create_issue(repo:, title:, description:, labels: "") ⇒ Object
-
#initialize ⇒ GithubIssueCreation
constructor
A new instance of GithubIssueCreation.
Methods included from Utils
#camel_case_to_slug, #is_upper?, #symbolize_keys
Constructor Details
Instance Method Details
#create_issue(repo:, title:, description:, labels: "") ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/neetob/cli/monthly_audit/github_issue_creation.rb', line 11 def create_issue(repo:, title:, description:, labels: "") return if Thread.current[:skip_issue] month = Thread.current[:month].capitalize.gsub("-", " ") title = "#{month} Audit - #{title}" # Checking if the issue already exists issue = @helpers.get_issue_with_title("bigbinary/#{repo}", title) if issue return issue.html_url end begin issue = client.create_issue( "bigbinary/#{repo}", title, "## #{title} \n #{description}", { labels: } ) issue.html_url rescue StandardError => e ExceptionHandler.new(e).process end end |