lhj-tools 0.1.95 → 0.1.96
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lhj/helper/dingtalk_helper.rb +25 -0
- data/lib/lhj/helper/pgyer_helper.rb +1 -1
- data/lib/lhj/tools/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: aa4d693bb22ce7c5059df391d0596da915785429d480109afc53674710885976
|
4
|
+
data.tar.gz: b431fe5461e189eccc44bae77472c1cbad6bd0f4576675389b8ffba699612782
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1118b0ca825f9d8c6dd47a09f26bfab28a2b486e4ecf30893d685de5e21470e00bae8523dfe6c7b8aa8b8ede3a3b8c98fedd028ed4c7e2d60dbdda9f2f090a3b
|
7
|
+
data.tar.gz: 05471f260b844ae9851ebae6dc7763972182000065be1ac0a1c0b65637b1df6c1b8a27f7e425292bbf3b3a07d663128d63f673397671ea39e265d9eea5c5159b
|
@@ -18,6 +18,12 @@ module Lhj
|
|
18
18
|
http_post(robot_url, http_body)
|
19
19
|
end
|
20
20
|
|
21
|
+
def self.post_single_card_message(title, message, single_title, single_url)
|
22
|
+
robot_url = Lhj::DingTalkConfig.dingtalk_robot
|
23
|
+
http_body = single_action_card_body_message(title, message, single_title, single_url)
|
24
|
+
http_post(robot_url, http_body)
|
25
|
+
end
|
26
|
+
|
21
27
|
def self.post_branch_message(http_body)
|
22
28
|
branch_name = fetch_branch
|
23
29
|
branch_map = Lhj::DingTalkConfig.git_branch
|
@@ -63,6 +69,25 @@ module Lhj
|
|
63
69
|
}.to_json
|
64
70
|
end
|
65
71
|
|
72
|
+
def self.single_action_card_body_message(title, message, single_title, single_url)
|
73
|
+
{
|
74
|
+
'msgtype' => 'actionCard',
|
75
|
+
'actionCard' => { 'title' => title,
|
76
|
+
'text' => message,
|
77
|
+
'btnOrientation' => '0',
|
78
|
+
'singleTitle' => single_title,
|
79
|
+
'singleURL' => single_url }
|
80
|
+
}.to_json
|
81
|
+
end
|
82
|
+
|
83
|
+
# links: [{'title'=>'this is ...', 'messageURL'=>'https://www.dingtalk.com', 'picURL'=>'https://xx.png'}]
|
84
|
+
def self.feed_card_body_message(links)
|
85
|
+
{
|
86
|
+
'msgtype' => 'feedCard',
|
87
|
+
'feedCard' => links
|
88
|
+
}.to_json
|
89
|
+
end
|
90
|
+
|
66
91
|
def self.fetch_branch
|
67
92
|
name = Lhj::Actions.git_branch || ''
|
68
93
|
name.split('/').last
|
data/lib/lhj/tools/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lhj-tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.96
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- lihaijian
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-01-
|
11
|
+
date: 2023-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xcodeproj
|