fastlane-plugin-pgyer_jvtd 0.2.8 → 0.2.9

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: 4d26d0b8789e27a8143b5f9620280c382cff7adf6bc3ef851b8fbab456cb077f
4
- data.tar.gz: 710e042f4a2b205a5f2e6422536bc431ead33ca3ac1a3f28d64dadb61df27cd7
3
+ metadata.gz: 287d6f66b892c877222809a960dae0c349c0509612b4abbb50cc1018c12e0edf
4
+ data.tar.gz: c1dc327c2147b548677ba610c9a984c4a31d34d49e5fab349de8861be638adea
5
5
  SHA512:
6
- metadata.gz: 0e28164d4fa27eacbd5e624fb8d9eeb7ed1512b501743a836fa210b4c8d584dd6eaf93c3817400117a6d2571be35a78d602c3204e52f4340ef7bddb0417b2f78
7
- data.tar.gz: f036fe2536b79099f9b52d1ce61904bb67236b091df8c27aa4483ffe5d280b7694a69b694091c22495b81c5b2eb4bd5128776a07646bb5dd75d77a48c94192c4
6
+ metadata.gz: 40dacfa00756983d36c4e5350497316a4390efe76067a2c96d6c27caf8f562df4eec7f5c6e31d6f64e584a5dc8a47bdb881981c849b89da7c63c6fda09e73df4
7
+ data.tar.gz: 56098dda0c2b682be0b1d50f60c334d4448864b2cde34a809ca96870ed8cedccdff03cd2a5d320c53d80bdb47c1c146550499de97febf2ef06bece81970961d5
@@ -135,6 +135,27 @@ module Fastlane
135
135
  uri = URI.parse(uriStr)
136
136
  UI.success uriStr
137
137
 
138
+ params = {
139
+ "msgtype" => "text",
140
+ "text" => "#{appName}#{appType} App最新#{appEnvironment}版本已发布",
141
+ "at" => {
142
+ "atMobiles" => [],
143
+ "isAtAll" => is_at_all == "1"
144
+ }
145
+ }
146
+
147
+ https = Net::HTTP.new(uri.host, uri.port)
148
+ https.use_ssl = true
149
+ req = Net::HTTP::Post.new(uri.request_uri)
150
+ req.body = params.to_json
151
+ req.content_type = 'application/json'
152
+ resp = https.request(req)
153
+ info = JSON.parse(resp.body)
154
+
155
+ if info['errcode'] != 0
156
+ UI.error('ding talk error message: ' + info["errmsg"])
157
+ end
158
+
138
159
  params = {
139
160
  "msgtype" => "link",
140
161
  "link" => {
@@ -160,9 +181,8 @@ module Fastlane
160
181
  params = {
161
182
  "msgtype" => "markdown",
162
183
  "markdown" => {
163
- "title" => "#{appName}#{appType} App最新#{appEnvironment}版本已发布",
164
- "text" => "#### #{appName}#{appType} App最新#{appEnvironment}版本已发布\n" +
165
- "> 扫描二维码即可安装" +
184
+ "title" => "#{appName}#{appType} App最新#{appEnvironment}版本",
185
+ "text" => "> 扫描二维码即可安装\n" +
166
186
  "> ![qrcode](#{appQrCode})\n"
167
187
  },
168
188
  "at" => {
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module PgyerJvtd
3
- VERSION = "0.2.8"
3
+ VERSION = "0.2.9"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-pgyer_jvtd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - 陈磊的MacBook Pro