Compare commits

..

No commits in common. "8f3bbde7333bb31b922448bc893eebaf239c979e" and "43a28045627ace667c7988adde0a123abee4536d" have entirely different histories.

2 changed files with 1 additions and 15 deletions

View File

@ -47,6 +47,6 @@ async def activity_events() -> list[dict]:
"repo": event.get("repo") or {}, "repo": event.get("repo") or {},
"created_at": event.get("created", ""), "created_at": event.get("created", ""),
} }
for event in (events or []) for event in events
if isinstance(event, dict) if isinstance(event, dict)
] ]

View File

@ -148,17 +148,3 @@ async def test_activity_events_skips_malformed_feed_entries(monkeypatch):
"repo": {"full_name": "stackchain/stackchain-dashboard"}, "repo": {"full_name": "stackchain/stackchain-dashboard"},
"created_at": "2026-08-06T08:00:00Z", "created_at": "2026-08-06T08:00:00Z",
}] }]
@pytest.mark.anyio
async def test_activity_events_normalizes_null_feed_payload(monkeypatch):
async def fake_current_user():
return {"login": "timmy"}
async def fake_fetch(path):
return None
monkeypatch.setattr(gitea_proxy, "current_user", fake_current_user)
monkeypatch.setattr(gitea_proxy, "fetch", fake_fetch)
assert await gitea_proxy.activity_events() == []