Skip to content

Commit

Permalink
Revert "Update actions_changelogs_since_last_run.py (#841)"
Browse files Browse the repository at this point in the history
This reverts commit bbd616d.
  • Loading branch information
Mnemotechnician committed Sep 6, 2024
1 parent 391cb06 commit c0ee9d7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Tools/actions_changelogs_since_last_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
DISCORD_SPLIT_LIMIT = 2000
DISCORD_WEBHOOK_URL = os.environ.get("DISCORD_WEBHOOK_URL")

CHANGELOG_FILE = "{CHANGELOG_DIR}"

TYPES_TO_EMOJI = {
"Fix": "🐛",
"Add": "🆕",
Expand Down Expand Up @@ -56,7 +58,7 @@ def main():
most_recent = get_most_recent_workflow(session)
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_DIR, "r") as f:
with open(CHANGELOG_FILE, "r") as f:
cur_changelog = yaml.safe_load(f)

diff = diff_changelog(last_changelog, cur_changelog)
Expand Down Expand Up @@ -104,7 +106,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_DIR}", headers=headers, params=params)
resp = sess.get(f"{GITHUB_API_URL}/repos/{GITHUB_REPOSITORY}/contents/{CHANGELOG_FILE}", headers=headers, params=params)
resp.raise_for_status()
return resp.text

Expand Down

0 comments on commit c0ee9d7

Please sign in to comment.