fastlane-plugin-slack_bot 0.4.0 → 0.4.1
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 +4 -4
- data/README.md +15 -3
- data/lib/fastlane/plugin/slack_bot/actions/post_to_slack.rb +7 -0
- data/lib/fastlane/plugin/slack_bot/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e0d95cdc34c99e1608ec3d1e30ff2f0b538516bd370fd166bc09c97d61e5781
|
4
|
+
data.tar.gz: cc8eb032bfc0b3e3022a2a390981120cdf9245812ef46c7fbe9ff0dd2808a0f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d76ae4594ce67f876db6d0fe4673503f05088e64cad0bf6faf5bd5f0fcaaa5d972f2c146454aa425e6a1de980436297533e5881eb8438547e78878783dc6706
|
7
|
+
data.tar.gz: d0abe8adad2c616a9feb9521bf29a2cda9f49cbab0f4895379bbb97fd2ed2791d354f9b1bdafdb59430e0773ecf0baa9888d0aa0ecefd6e448974f866dda0556
|
data/README.md
CHANGED
@@ -54,7 +54,8 @@ Using this `slack_bot` plugin, you can:
|
|
54
54
|
- [x] Post a message to a _public_ channel
|
55
55
|
- [x] Post a message to a _private_ channel
|
56
56
|
- [x] Post a message to a _slack user_ (DM)
|
57
|
-
- [x] Post a message inside a _slack thread_ 🧵
|
57
|
+
- [x] Post a message inside a _slack thread_ 🧵
|
58
|
+
- [x] Post a message with _custom Bot username and icon_
|
58
59
|
|
59
60
|
- Update a message using [chat.update](https://api.slack.com/methods/chat.update) Slack API
|
60
61
|
- [x] update a message in a channel
|
@@ -66,8 +67,8 @@ Using this `slack_bot` plugin, you can:
|
|
66
67
|
- [x] Upload a file to a _public_ channel
|
67
68
|
- [x] Upload a file to a _private_ channel
|
68
69
|
- [x] Upload a file to a _slack user_ (DM)
|
69
|
-
- [x] Upload a file inside a _slack thread_ 🧵
|
70
|
-
- [x] Upload a file with
|
70
|
+
- [x] Upload a file inside a _slack thread_ 🧵
|
71
|
+
- [x] Upload a file with _multiple channels/users_
|
71
72
|
|
72
73
|
|
73
74
|
## Examples (Post a message)
|
@@ -168,6 +169,17 @@ lane :release do
|
|
168
169
|
end
|
169
170
|
```
|
170
171
|
|
172
|
+
Let’s post a message with custom slack bot username and icon
|
173
|
+
|
174
|
+
```ruby
|
175
|
+
# share on Slack
|
176
|
+
post_to_slack(
|
177
|
+
message: "App successfully released!",
|
178
|
+
username: "Release Bot", # Overrides the bot's image
|
179
|
+
icon_url: "https://fastlane.tools/assets/img/fastlane_icon.png" # Overrides the bot's icon
|
180
|
+
)
|
181
|
+
```
|
182
|
+
|
171
183
|
## Examples (Upload a file)
|
172
184
|
|
173
185
|
Let’s Upload a file to a slack channel that main branch unit tests has been failed, see scan logs.
|
@@ -38,6 +38,7 @@ module Fastlane
|
|
38
38
|
icon_url: bot_icon_url,
|
39
39
|
attachments: [slack_attachment]
|
40
40
|
}
|
41
|
+
payload[:as_user] = options[:as_user] if options[:as_user] # default is false
|
41
42
|
payload[:thread_ts] = options[:thread_ts] unless options[:thread_ts].nil?
|
42
43
|
payload = payload.to_json
|
43
44
|
|
@@ -104,6 +105,12 @@ module Fastlane
|
|
104
105
|
default_value: "https://fastlane.tools/assets/img/fastlane_icon.png",
|
105
106
|
is_string: true,
|
106
107
|
optional: true),
|
108
|
+
FastlaneCore::ConfigItem.new(key: :as_user,
|
109
|
+
env_name: "FL_POST_TO_SLACK_AS_USER",
|
110
|
+
description: "Pass true to post the message as the authed user. Defaults to false",
|
111
|
+
optional: true,
|
112
|
+
default_value: false,
|
113
|
+
is_string: false),
|
107
114
|
FastlaneCore::ConfigItem.new(key: :pretext,
|
108
115
|
env_name: "FL_POST_TO_SLACK_PRETEXT",
|
109
116
|
description: "This is optional text that appears above the message attachment block. This supports the standard Slack markup language",
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-slack_bot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Manish Rathi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-03-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|