Fix webhook underscores

This commit is contained in:
Willy-JL
2024-03-06 00:37:23 +00:00
parent 9eca8dba6c
commit 256cb939b2

View File

@@ -34,7 +34,7 @@ if __name__ == "__main__":
)
desc = f"[**{change}**]({event['compare']}) | [{branch}]({event['repository']['html_url']}/tree/{branch})\n"
for i, commit in enumerate(event["commits"]):
msg = commit['message'].splitlines()[0].replace("`", "")
msg = commit['message'].splitlines()[0].replace("`", "").replace("_", "\_")
msg = msg[:50] + ("..." if len(msg) > 50 else "")
desc += f"\n[`{commit['id'][:7]}`]({commit['url']}): {msg} - [__{commit['author'].get('username')}__](https://github.com/{commit['author'].get('username')})"
if len(desc) > 2020: