Class: Ruboty::Github::Actions::CloseIssue
- Defined in:
- lib/ruboty/github/actions/close_issue.rb
Direct Known Subclasses
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Ruboty::Github::Actions::Base
Instance Method Details
#call ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/ruboty/github/actions/close_issue.rb', line 7 def call if !has_access_token? require_access_token elsif has_closed_issue_number? reply_already_closed else close end rescue Octokit::Unauthorized .reply('Failed in authentication (401)') rescue Octokit::NotFound .reply('Could not find that issue') rescue StandardError => e raise e .reply("Failed by #{e.class}") end |