Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Roger Oba <rogerluan.oba@gmail.com>
  • Loading branch information
ainame and rogerluan committed Apr 30, 2021
1 parent 0794a34 commit 1541c8f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fastlane/lib/fastlane/notification/slack.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def initialize(webhook_url)
end

# Overriding channel, icon_url and username is only supported in legacy incoming webhook.
# And use of attachments is now deprecated.
# Also note that the use of attachments has been discouraged by Slack, in favor of Block Kit.
# https://api.slack.com/legacy/custom-integrations/messaging/webhooks
def post_to_legacy_incoming_webhook(channel:, username:, attachments:, link_names:, icon_url:)
@client.post(@webhook_url) do |request|
Expand All @@ -24,7 +24,7 @@ def post_to_legacy_incoming_webhook(channel:, username:, attachments:, link_name
end
end

# This is a substitue of this LinkFormatter in slack-notifier
# This class was inspired by `LinkFormatter` in `slack-notifier` gem
# 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>}
Expand Down

0 comments on commit 1541c8f

Please sign in to comment.