From 7cb0a232f7b449f3c7fdb88f958649a3b31db8a0 Mon Sep 17 00:00:00 2001 From: VigersRay Date: Mon, 22 Jul 2024 07:01:07 +0300 Subject: [PATCH] =?UTF-8?q?=D1=84=D0=B8=D0=BA=D1=81=20actions=5Fchangelogs?= =?UTF-8?q?=5Fsince=5Flast=5Frun.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Tools/actions_changelogs_since_last_run.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Tools/actions_changelogs_since_last_run.py b/Tools/actions_changelogs_since_last_run.py index 471a679c97e..3151a2a8766 100755 --- a/Tools/actions_changelogs_since_last_run.py +++ b/Tools/actions_changelogs_since_last_run.py @@ -42,9 +42,15 @@ def main(): session.headers["X-GitHub-Api-Version"] = "2022-11-28" most_recent = get_most_recent_workflow(session) + + if most_recent is None: + print("No successful publish jobs found.") + return + last_sha = most_recent['head_commit']['id'] print(f"Last successful publish job was {most_recent['id']}: {last_sha}") last_changelog = yaml.safe_load(get_last_changelog(session, last_sha)) + with open(CHANGELOG_FILE, "r") as f: cur_changelog = yaml.safe_load(f)