From bbd616d3f305ebdcf57658bb3260071a248c9b7e Mon Sep 17 00:00:00 2001 From: DEATHB4DEFEAT <77995199+DEATHB4DEFEAT@users.noreply.github.com> Date: Sun, 1 Sep 2024 16:57:10 -0700 Subject: [PATCH] Update actions_changelogs_since_last_run.py (#841) Signed-off-by: DEATHB4DEFEAT <77995199+DEATHB4DEFEAT@users.noreply.github.com> --- Tools/actions_changelogs_since_last_run.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Tools/actions_changelogs_since_last_run.py b/Tools/actions_changelogs_since_last_run.py index 37c1e7a759e..8150ee986d2 100755 --- a/Tools/actions_changelogs_since_last_run.py +++ b/Tools/actions_changelogs_since_last_run.py @@ -22,8 +22,6 @@ # https://discord.com/developers/docs/resources/webhook DISCORD_SPLIT_LIMIT = 2000 -CHANGELOG_FILE = "{CHANGELOG_DIR}" - TYPES_TO_EMOJI = { "Fix": "🐛", "Add": "🆕", @@ -46,7 +44,7 @@ def main(): 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: + with open(CHANGELOG_DIR, "r") as f: cur_changelog = yaml.safe_load(f) diff = diff_changelog(last_changelog, cur_changelog) @@ -94,7 +92,7 @@ def get_last_changelog(sess: requests.Session, sha: str) -> str: "Accept": "application/vnd.github.raw" } - resp = sess.get(f"{GITHUB_API_URL}/repos/{GITHUB_REPOSITORY}/contents/{CHANGELOG_FILE}", headers=headers, params=params) + resp = sess.get(f"{GITHUB_API_URL}/repos/{GITHUB_REPOSITORY}/contents/{CHANGELOG_DIR}", headers=headers, params=params) resp.raise_for_status() return resp.text