mirror of
https://github.com/sotam0316/docker-py-revanced.git
synced 2026-04-25 03:48:37 +09:00
🎨 Updated changelog headers
This commit is contained in:
+6
-7
@@ -71,23 +71,22 @@ def format_changelog(name: str, response: dict[str, str]) -> dict[str, str]:
|
|||||||
"""
|
"""
|
||||||
final_name = f"[{name}]({response['html_url']})"
|
final_name = f"[{name}]({response['html_url']})"
|
||||||
return {
|
return {
|
||||||
"Name": final_name,
|
"ResourceName": final_name,
|
||||||
"Version": response["tag_name"],
|
"Version": response["tag_name"],
|
||||||
"Changelog": response["body"],
|
"Changelog": response["body"],
|
||||||
"Published at": response["published_at"],
|
"Published On": response["published_at"],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def write_changelog_to_file() -> None:
|
def write_changelog_to_file() -> None:
|
||||||
"""The function `write_changelog_to_file` writes a given changelog json to a file."""
|
"""The function `write_changelog_to_file` writes a given changelog json to a file."""
|
||||||
markdown_table = (
|
markdown_table = """| Resource Name | Version | Changelog | Published On |\n
|
||||||
"| AppName | Version | Changelog | Published At |\n" + "|---------|---------|-----------|--------------|\n"
|
"|---------|---------|-----------|--------------|\n"""
|
||||||
)
|
|
||||||
for app_data in changelogs.values():
|
for app_data in changelogs.values():
|
||||||
name_link = app_data["Name"]
|
name_link = app_data["ResourceName"]
|
||||||
version = app_data["Version"]
|
version = app_data["Version"]
|
||||||
changelog = app_data["Changelog"]
|
changelog = app_data["Changelog"]
|
||||||
published_at = app_data["Published at"]
|
published_at = app_data["PublishedOn"]
|
||||||
|
|
||||||
# Clean up changelog for markdown
|
# Clean up changelog for markdown
|
||||||
changelog = changelog.replace("\r\n", "<br>")
|
changelog = changelog.replace("\r\n", "<br>")
|
||||||
|
|||||||
Reference in New Issue
Block a user