fastlane-plugin-slack_bot 1.5.1 → 1.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ebfda39c0d011741ce438b5792ba7705fd3545dd0055010449c693a87dc457f4
|
4
|
+
data.tar.gz: 79a1c25e71e09dc672a0320fb7d52f1fb496aef733fcf53ed51e86ea96da934d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9f8d582eb9bbe61c006782498f2aad523798789e88b950ab10d9c5db7fcc8ed3164d2da202e9362962407f624707ca4440761eea4e2e364ed85d7290e2434eb
|
7
|
+
data.tar.gz: 46c8a834128c55d9ae8c76f8f6bd57daa59dab271ff4b4d92465d4337ac39dc3f0545519bb7d4e87241c7853cf4fc78993d362dfcc7114dcb91821706bf65b5b
|
@@ -142,12 +142,6 @@ module Fastlane
|
|
142
142
|
optional: true,
|
143
143
|
default_value: true,
|
144
144
|
is_string: false),
|
145
|
-
FastlaneCore::ConfigItem.new(key: :no_color,
|
146
|
-
env_name: "FL_POST_TO_SLACK_NO_COLOR",
|
147
|
-
description: "Removes the border on the left side. If true, :success option will be ignored",
|
148
|
-
optional: true,
|
149
|
-
default_value: false,
|
150
|
-
is_string: false),
|
151
145
|
FastlaneCore::ConfigItem.new(key: :thread_ts,
|
152
146
|
env_name: "FL_POST_TO_SLACK_THREAD_TS",
|
153
147
|
description: "Provide another message's ts value to make this message a reply",
|
@@ -15,18 +15,18 @@ module Fastlane
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def self.generate_slack_attachments(options)
|
18
|
+
color = (options[:success] ? 'good' : 'danger')
|
18
19
|
should_add_payload = ->(payload_name) { options[:default_payloads].map(&:to_sym).include?(payload_name.to_sym) }
|
19
20
|
|
20
21
|
slack_attachment = {
|
21
22
|
fallback: options[:message],
|
22
23
|
text: options[:message],
|
23
24
|
pretext: options[:pretext],
|
25
|
+
color: color,
|
24
26
|
mrkdwn_in: ["pretext", "text", "fields", "message"],
|
25
27
|
fields: []
|
26
28
|
}
|
27
29
|
|
28
|
-
slack_attachment[:color] = (options[:success] ? 'good' : 'danger') unless options[:no_color]
|
29
|
-
|
30
30
|
# custom user payloads
|
31
31
|
slack_attachment[:fields] += options[:payload].map do |k, v|
|
32
32
|
{
|