fastlane-plugin-slack_bot 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4f2aabbc8c122fde9ab66c2f19a43ee068eeb1905fe71676b58f3f97615df758
4
- data.tar.gz: 2f14989f7e4afcf43fd873748b385bb9fb30c5e8b419d4c4ad35b5f910dedd8b
3
+ metadata.gz: 9e0d95cdc34c99e1608ec3d1e30ff2f0b538516bd370fd166bc09c97d61e5781
4
+ data.tar.gz: cc8eb032bfc0b3e3022a2a390981120cdf9245812ef46c7fbe9ff0dd2808a0f5
5
5
  SHA512:
6
- metadata.gz: 4aa6547bd6c2d4b3f4275be0296027171e1e4f47e90540bd676e1adedc92840bc5945972e1462ada73f1a30eabf8ba7eeebaf9d46e76205d81053bc2595ceb3b
7
- data.tar.gz: 15a515660c49d9ca4b7d9de700c4212692402c05d53feba5b039fadc82c00f7bf03fcd6255b8467c659ef8545028f823723ef3e30cde8efbd7144fc1b1e8ebfc
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_ 🧵 (DM)
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_ 🧵 (DM)
70
- - [x] Upload a file with multiple channels/users
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",
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module SlackBot
3
- VERSION = "0.4.0"
3
+ VERSION = "0.4.1"
4
4
  end
5
5
  end
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.0
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-02-20 00:00:00.000000000 Z
11
+ date: 2021-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry