Skip to content

Commit

Permalink
Fix format by rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
ainame committed Apr 10, 2021
1 parent 227ae3d commit 19b9dd2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fastlane/lib/fastlane/notification/slack.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class Slack
def initialize(webhook_url)
@webhook_url = webhook_url
@client = Faraday.new do |conn|
conn.use Faraday::Response::RaiseError
conn.use(Faraday::Response::RaiseError)
end
end

Expand All @@ -19,7 +19,7 @@ def post_to_legacy_incoming_webhook(channel:, username:, attachments:, link_name
username: username,
icon_url: icon_url,
attachments: attachments,
link_names: link_names,
link_names: link_names
}.to_json
end
end
Expand All @@ -28,7 +28,7 @@ def post_to_legacy_incoming_webhook(channel:, username:, attachments:, link_name
# https://github.com/stevenosloan/slack-notifier/blob/4bf6582663dc9e5070afe3fdc42d67c14a513354/lib/slack-notifier/util/link_formatter.rb
class LinkConverter
HTML_PATTERN = %r{<a.*?href=['"](?<link>#{URI.regexp})['"].*?>(?<label>.+?)<\/a>}
MARKDOWN_PATTERN = %r{\[(?<label>[^\[\]]*?)\]\((?<link>#{URI.regexp}|mailto:#{URI::MailTo::EMAIL_REGEXP})\)}
MARKDOWN_PATTERN = /\[(?<label>[^\[\]]*?)\]\((?<link>#{URI.regexp}|mailto:#{URI::MailTo::EMAIL_REGEXP})\)/

def self.convert(string)
convert_markdown_to_slack_link(convert_html_to_slack_link(string.scrub))
Expand Down

0 comments on commit 19b9dd2

Please sign in to comment.