fix: ignore apps without pyproject (#26498)

This commit is contained in:
Ankush Menat 2024-05-21 13:14:07 +05:30 committed by GitHub
parent 2953c165cf
commit c973d08fe2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -318,6 +318,8 @@ def parse_github_url(remote_url: str) -> tuple[str, str] | tuple[None, None]:
def get_source_url(app: str) -> str | None:
"""Get the remote URL of the app."""
pyproject = get_pyproject(app)
if not pyproject:
return
if remote_url := pyproject.get("project", {}).get("urls", {}).get("Repository"):
return remote_url.rstrip("/")