Include URL in Discord bot changelog to link to the Github PR page

LGTM!
This commit is contained in:
SlamBamActionman
2023-12-16 22:00:59 +01:00
committed by GitHub
parent 6f4fbb1797
commit 9e33966315
2 changed files with 5 additions and 3 deletions

View File

@@ -114,8 +114,9 @@ def send_to_discord(entries: Iterable[ChangelogEntry]) -> None:
for entry in group:
for change in entry["changes"]:
emoji = TYPES_TO_EMOJI.get(change['type'], "")
url = entry["url"]
message = change['message']
content.write(f"{emoji} {message}\n")
content.write(f"{emoji} [-]({url}) {message}\n")
body = {
"content": content.getvalue(),
@@ -130,4 +131,4 @@ def send_to_discord(entries: Iterable[ChangelogEntry]) -> None:
requests.post(DISCORD_WEBHOOK_URL, json=body)
main()
main()