[reformat] text

This commit is contained in:
xtao-dada 2022-03-05 16:35:44 +08:00
parent 53f77db105
commit 276271c8d4
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659

4
app.py
View File

@ -37,8 +37,8 @@ async def webhook():
def generatePushMsg(data):
msg = f'*🔨 {data["total_commits_count"]} new commits to ' \
f'{data["project"]["name"]}:{data["project"]["default_branch"]}*:\n\n'
msg = f'<b>🔨 {data["total_commits_count"]} new commits to ' \
f'{data["project"]["name"]}:{data["project"]["default_branch"]}</b>:\n\n'
for commit in data['commits']:
tag_link = f'<a href="{commit["url"]}">{commit["id"][:7]}</a>'
msg = msg + f"{tag_link}: {commit['message'].rstrip()}\n"