scan/lib/scan/slack_poster.rb in fastlane_hotfix-2.165.1 vs scan/lib/scan/slack_poster.rb in fastlane_hotfix-2.187.0
- old
+ new
@@ -1,7 +1,8 @@
require 'fastlane/action'
require 'fastlane/actions/slack'
+require 'fastlane_core/configuration/configuration'
require_relative 'module'
module Scan
class SlackPoster
@@ -41,20 +42,22 @@
value: (results[:tests] - results[:failures]).to_s,
short: true
}
end
- Fastlane::Actions::SlackAction.run({
+ options = FastlaneCore::Configuration.create(Fastlane::Actions::SlackAction.available_options, {
message: "#{Scan.config[:app_name] || Scan.project.app_name} Tests:\n#{Scan.config[:slack_message]}",
channel: channel,
slack_url: Scan.config[:slack_url].to_s,
success: results[:build_errors].to_i == 0 && results[:failures].to_i == 0,
username: username,
icon_url: icon_url,
payload: {},
+ default_payloads: Scan.config[:slack_default_payloads],
attachment_properties: {
fields: fields
}
})
+ Fastlane::Actions::SlackAction.run(options)
end
end
end