Class: Neetob::CLI::Github::Issues::Helpers

Inherits:
Base
  • Object
show all
Defined in:
lib/neetob/cli/github/issues/helpers.rb

Constant Summary

Constants inherited from Base

Base::NEETO_APPS_LIST_LINK

Instance Attribute Summary

Attributes inherited from Base

#access_token, #client

Attributes inherited from Base

#ui

Instance Method Summary collapse

Methods included from Utils

#camel_case_to_slug, #is_upper?, #symbolize_keys

Constructor Details

#initializeHelpers



10
11
12
# File 'lib/neetob/cli/github/issues/helpers.rb', line 10

def initialize
  super()
end

Instance Method Details

#get_issue_with_title(repo, title) ⇒ Object



14
15
16
17
18
19
20
21
22
# File 'lib/neetob/cli/github/issues/helpers.rb', line 14

def get_issue_with_title(repo, title)
  begin
    issues = client.issues(repo, state: "open")
    issue = issues.find { |issue| issue.title == title }
    issue
  rescue StandardError => e
    ExceptionHandler.new(e).process
  end
end