Commit 107a4f11 by 段志勇

95549

parent 905d195f
......@@ -67,12 +67,7 @@ def send_ding_talk_request():
host_url = "https://oapi.dingtalk.com/robot/send?access_token=" + get_dd_host()
req = urllib.request.Request(host_url)
req.add_header('Content-Type', 'application/json')
params_str = get_request_params_str()
# print(params_str)
print(host_url)
response = urllib.request.urlopen(req, params_str.encode('utf-8'))
print(response.read().decode('utf-8'))
pass
......
......@@ -64,6 +64,8 @@ echo_log "${RESPONSE}"
RESPONSE_CODE=$(echo $RESPONSE | jq '.code')
DD_ICON_URL=$(echo $RESPONSE | jq '.data.buildIcon')
DD_DOWN_URL=$(echo $RESPONSE | jq '.data.buildShortcutUrl')
echo_log ${DD_ICON_URL}
echo_log ${DD_DOWN_URL}
if [ $RESPONSE_CODE -ne 0 ]; then
echo_error "upload error"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment