lib/ruboty/github/actions/create_issue.rb in ruboty-qiita-github-0.2.3 vs lib/ruboty/github/actions/create_issue.rb in ruboty-qiita-github-0.3.0
- old
+ new
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
module Ruboty
module Github
module Actions
class CreateIssue < Base
def call
@@ -13,14 +15,14 @@
private
def create
message.reply("Created #{issue.html_url}")
rescue Octokit::Unauthorized
- message.reply("Failed in authentication (401)")
+ message.reply('Failed in authentication (401)')
rescue Octokit::NotFound
- message.reply("Could not find that repository")
- rescue => exception
- message.reply("Failed by #{exception.class}")
+ message.reply('Could not find that repository')
+ rescue StandardError => e
+ message.reply("Failed by #{e.class}")
end
def issue
client.create_issue(repository, title, body)
end