1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-23 19:44:20 +00:00

Add url in github hook

This commit is contained in:
Steffo 2019-01-02 19:15:04 +01:00
parent cb1650d912
commit 4afeda5d69

View file

@ -415,7 +415,8 @@ def hooks_github():
# TODO: add secret check
message = f"🐙 Nuovi aggiornamenti a Royalnet:\n"
for commit in j.get("commits", []):
message += f'<a href="https://github.com/Steffo99/royalnet/commit/{commit["sha"]}">{commit["message"]}</b> di {commit["author"]}\n'
if commit["distinct"]:
message += f'<a href="https://github.com/Steffo99/royalnet/commit/{commit["url"]}">{commit["message"]}</b> di {commit["author"]}\n'
telegram_bot.send_message(config["Telegram"]["main_group"], message,
parse_mode="HTML", disable_web_page_preview=True, disable_notification=True)
return "Done."