From ff65531a6fe6a23a77d80dea5dc9c7164d56da1f Mon Sep 17 00:00:00 2001 From: Nikhil Badyal Date: Sat, 13 Apr 2024 01:26:54 +0530 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Updated=20changelog=20headers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/utils.py b/src/utils.py index 6a02f04..b590314 100644 --- a/src/utils.py +++ b/src/utils.py @@ -71,23 +71,22 @@ def format_changelog(name: str, response: dict[str, str]) -> dict[str, str]: """ final_name = f"[{name}]({response['html_url']})" return { - "Name": final_name, + "ResourceName": final_name, "Version": response["tag_name"], "Changelog": response["body"], - "Published at": response["published_at"], + "Published On": response["published_at"], } def write_changelog_to_file() -> None: """The function `write_changelog_to_file` writes a given changelog json to a file.""" - markdown_table = ( - "| AppName | Version | Changelog | Published At |\n" + "|---------|---------|-----------|--------------|\n" - ) + markdown_table = """| Resource Name | Version | Changelog | Published On |\n + "|---------|---------|-----------|--------------|\n""" for app_data in changelogs.values(): - name_link = app_data["Name"] + name_link = app_data["ResourceName"] version = app_data["Version"] changelog = app_data["Changelog"] - published_at = app_data["Published at"] + published_at = app_data["PublishedOn"] # Clean up changelog for markdown changelog = changelog.replace("\r\n", "
")