"GITHUB_REPOSITORY" not set (#513)

This commit is contained in:
create-issue-branch[bot]
2024-04-28 18:45:55 +05:30
committed by GitHub
parent 61dde7f7be
commit 419892a2eb
+2 -2
View File
@@ -251,15 +251,15 @@ def datetime_to_ms_epoch(dt: datetime) -> int:
def load_older_updates(env: Env) -> dict[str, Any]:
"""Load older updated from updates.json."""
try:
update_file_url = updates_file_url.format(
github_repository=env.str("GITHUB_REPOSITORY"),
branch_name=branch_name,
updates_file=updates_file,
)
try:
with urllib.request.urlopen(update_file_url) as url:
return json.load(url) # type: ignore[no-any-return]
except urllib.error.URLError as e:
except Exception as e: # noqa: BLE001
logger.error(f"Failed to retrieve update file: {e}")
return {}