🐛 Changelog not getting generated

This commit is contained in:
Nikhil Badyal
2023-08-25 23:05:32 +05:30
parent e740293d5e
commit 24b3af211b
2 changed files with 8 additions and 1 deletions
+1
View File
@@ -76,6 +76,7 @@ class Github(Downloader):
headers["Authorization"] = f"token {config.personal_access_token}"
response = requests.get(api_url, headers=headers, timeout=60)
handle_request_response(response)
update_changelog(f"{github_repo_owner}/{github_repo_name}", response.json())
assets = response.json()["assets"]
try:
filter_pattern = re.compile(asset_filter)
+7 -1
View File
@@ -28,6 +28,7 @@ request_header = {
"Content-Type": "application/json",
}
bs4_parser = "html.parser"
changelog_file = "changelog.md"
def update_changelog(name: str, response: Dict[str, str]) -> None:
@@ -84,7 +85,7 @@ def write_to_file(change_log: str) -> None:
change_log : str
A string representing the changelog that you want to write to the file.
"""
with Path("changelog.md").open("w", encoding="utf_8") as file1:
with Path(changelog_file).open("a", encoding="utf_8") as file1:
file1.write(change_log)
@@ -193,6 +194,11 @@ def extra_downloads(config: RevancedConfig) -> None:
logger.info("Unable to download extra file. Provide input in url@name.apk format.")
def delete_old_changelog() -> None:
"""The function `delete_old_changelog` deleted old changelog file."""
Path(changelog_file).unlink(missing_ok=True)
def apkmirror_status_check(package_name: str) -> Any:
"""The `apkmirror_status_check` function checks if an app exists on APKMirror.