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

Use a different message if unity is being updated instead of master

This commit is contained in:
Steffo 2019-03-24 11:59:29 +01:00
parent 2a01e025ec
commit 36fb339480

View file

@ -392,7 +392,10 @@ def hooks_github():
abort(400)
return
# TODO: add secret check
message = f"🐙 Nuovi aggiornamenti a Royalnet:\n"
if j["ref"] == "refs/heads/master":
message = f"🐙 Nuovi aggiornamenti a Royalnet <code>master</code>:\n"
if j["ref"] == "refs/heads/unity":
message = f"🐙 Progresso di Royalnet <code>unity</code>:\n"
for commit in j.get("commits", []):
if commit["distinct"]:
message += f'<a href="{commit["url"]}">{commit["message"]}</a>' \