nisse-review: one unlistable repository holds up no other
CI / checks (push) Skipped
CI / checks (pull_request) Successful in 2m2s
CI / e2e (pull_request) Successful in 4m13s

Found at bring-up: an empty private repository's /pulls answered 404, and
intake stopped there, so the whole round failed and nothing was reviewed.
A repository whose PRs can't be listed is now logged (intake.repo_failed)
and skipped for the round; its items stay as they are.

Also, from nisse-review's review of this PR: a two-page test pins the
search listing the patterns rest on.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J5Utyfzw7gF7UhjRDEtjTk
This commit is contained in:
dongarandClaude Opus 5.5 committed 2026-10-16 22:56:43 +00:00
1 parent faf973be6c
commit 6e697b55a8
4 files changed
+43 -1

No files matched your search

+9 -1
View File
@@ -106,8 +106,16 @@ class Scheduler:
repos = reviewed(self._gitea, self._patterns, self._oplog)
open_items = {i.id: i for i in self._store.work_items("open")}
for repo in repos:
try:
prs = self._gitea.open_pull_requests(repo)
except GiteaError as exc:
# One repository Gitea won't list (an empty one, one without
# pull requests) holds up none of the others; its items stay
# as they are.
self._oplog.emit("intake.repo_failed", cause=str(exc)[:300], repo=repo)
continue
seen: set[str] = set()
for pr in self._gitea.open_pull_requests(repo):
for pr in prs:
key = item_id(repo, pr.number)
seen.add(key)
self._see(open_items.get(key), repo, pr)