8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# File 'lib/fastlane/plugin/fastci/helper/dingding_helper.rb', line 8
def self.sendMarkdown(text)
unless CommonHelper.is_validate_string(Environment.dingdingToken)
UI.message("*************| 跳过钉钉消息通知(未配置 Token)|*************")
return
end
UI.message("*************| 开始钉钉消息通知 |*************")
curl = %Q{
curl 'https://oapi.dingtalk.com/robot/send?access_token=#{Environment.dingdingToken}' \
-H 'Content-Type:application/json' \
-d '{
"msgtype":"markdown",
"markdown":{
"title":"#{Environment.scheme} 打包通知",
"text":"#{text}"
}
}'
}
system curl
end
|