CI: Support topic

This commit is contained in:
omg-xtao 2022-11-06 22:42:00 +08:00 committed by GitHub
parent 019a00e2f2
commit 0d6191470a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,12 +8,14 @@ text = "#更新日志 #" + main['commit']['author']['name'].replace('_', '') + \
main['sha'] + '): ' + main['commit']['message'] main['sha'] + '): ' + main['commit']['message']
push_content = {'chat_id': '-1001441461877', 'disable_web_page_preview': 'True', 'parse_mode': 'markdown', push_content = {'chat_id': '-1001441461877', 'disable_web_page_preview': 'True', 'parse_mode': 'markdown',
'text': text} 'text': text}
push_content['message_thread_id'] = 1027828
url = 'https://api.telegram.org/bot' + token + '/sendMessage' url = 'https://api.telegram.org/bot' + token + '/sendMessage'
try: try:
main_req = post(url, data=push_content) main_req = post(url, data=push_content)
except: except:
pass pass
push_content['chat_id'] = '-1001319957857' push_content['chat_id'] = '-1001319957857'
del push_content['message_thread_id']
time.sleep(1) time.sleep(1)
try: try:
main_req = post(url, data=push_content) main_req = post(url, data=push_content)