Revert "Include URL in Discord bot changelog to link to the Github PR page" (#22498)

This commit is contained in:
Pieter-Jan Briers
2023-12-14 19:25:33 +01:00
committed by GitHub
parent bba158d9e7
commit 808d59d6ef
2 changed files with 3 additions and 5 deletions

View File

@@ -114,9 +114,8 @@ 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}]({url}) {message}\n")
content.write(f"{emoji} {message}\n")
body = {
"content": content.getvalue(),
@@ -131,4 +130,4 @@ def send_to_discord(entries: Iterable[ChangelogEntry]) -> None:
requests.post(DISCORD_WEBHOOK_URL, json=body)
main()
main()

View File

@@ -61,7 +61,6 @@ def main():
"time", datetime.datetime.now(datetime.timezone.utc).isoformat()
)
changes = partyaml["changes"]
url = partyaml["url"]
if not isinstance(changes, list):
changes = [changes]
@@ -72,7 +71,7 @@ def main():
new_id = max_id
entries_list.append(
{"author": author, "time": time, "changes": changes, "id": new_id, "url": url}
{"author": author, "time": time, "changes": changes, "id": new_id}
)
os.remove(partpath)