[fix] branch error

This commit is contained in:
xtaodada 2022-03-05 17:08:59 +08:00
parent 276271c8d4
commit fe08ecbfcb
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659

2
app.py
View File

@ -38,7 +38,7 @@ async def webhook():
def generatePushMsg(data):
msg = f'<b>🔨 {data["total_commits_count"]} new commits to ' \
f'{data["project"]["name"]}:{data["project"]["default_branch"]}</b>:\n\n'
f'{data["project"]["name"]}:{data["ref"].replace("refs/heads/", "")}</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"