Fix: Weekly report script error when no PR found for branch

Not all branches have a PR and code generally handled that case fine,
just this assert didn't treat it as a valid result.
This commit is contained in:
Julian Eisel
2025-05-27 15:57:28 +02:00
parent 43617743af
commit 7417a07adb

View File

@@ -117,7 +117,7 @@ def gitea_json_pull_request_by_base_and_head_get(repo_name: str, base: str, head
"""
url = f"{BASE_API_URL}/repos/{repo_name}/pulls/{base}/{head}"
result = url_json_get(url, quiet=True)
assert isinstance(result, dict)
assert result is None or isinstance(result, dict)
return result