From 18696d5c1b8040b4a5330ce53a92583593f4872c Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Wed, 10 Jan 2024 12:53:49 +1100 Subject: [PATCH] Minor discord cl fix (#23833) This means it won't send a dummy post if no changelog entries are found. The old one just sent it and didn't check if it worked. --- Tools/actions_changelogs_since_last_run.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Tools/actions_changelogs_since_last_run.py b/Tools/actions_changelogs_since_last_run.py index fde96f992c..10f76f7ff7 100755 --- a/Tools/actions_changelogs_since_last_run.py +++ b/Tools/actions_changelogs_since_last_run.py @@ -125,6 +125,10 @@ def send_to_discord(entries: Iterable[ChangelogEntry]) -> None: else: content.write(f"{emoji} - {message}\n") + if count == 0: + print("Skipping discord push as no changelog entries found") + return + print(f"Posting {count} changelog entries to discord webhook") body = { -- 2.51.2