nisse-review: match repository patterns against Gitea's search
CI / checks (push) Skipped
CI / checks (pull_request) Successful in 1m48s
CI / e2e (pull_request) Successful in 28m44s

At bring-up, `dev/*` failed: listing an organization's repositories
(/orgs/dev/repos) needs the read:organization token scope, which the
reviewer's token doesn't have and shouldn't need. Patterns are now matched
against /repos/search, which needs only the repository scope and already
lists every repository the account can read. A pattern that matches
nothing is logged (access.no_match). owner_repositories goes.

A Gitea error at startup is now reported like a config error, not a
traceback.

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:17:47 +00:00
1 parent 86f899006a
commit faf973be6c
8 files changed
+25 -58

No files matched your search

+3 -3
View File
@@ -882,9 +882,9 @@ else) towards better changes.
a draft, and not marked work in progress. Any author's: the operator's,
`nisse-dev`'s, or another tool's. Its repositories are the ones its Gitea
account was given, or, when configured, those matching patterns (`dev/*`,
`*/*`) among all it can read, public ones included: Gitea leaves a public
repository's Read collaborators out of an account's own list, so access to
public repositories is managed in configuration, and to private ones in Gitea.
`*/*`) among all it can read, public ones included, so a public repository
needs no grant in Gitea: access to public repositories is managed in
configuration, and to private ones in Gitea.
- **A work item per PR,** scoped to its repository (L1). It closes when the PR
merges or closes.
- **What starts a run:** the PR becoming ready, a new push, or a new comment or
+3 -3
View File
@@ -608,9 +608,9 @@ waits until two exist to compare. Moved, unchanged in behaviour:
ready unless a draft or titled WIP; closed when the PR merges or closes.
Every open PR is reviewed, those open when it starts included (operator).
Since #153, `repositories` holds patterns (`dev/*`, `*/*`) matched against
every repository it can read, public ones included (Gitea's own list for the
account leaves out a public repository's Read collaborators, found at
bring-up); the read-only wall is checked every round, not only at startup.
every repository it can read, public ones included, through Gitea's search
(`/repos/search`, which needs no `read:organization` scope); the read-only wall
is checked every round, not only at startup.
- **Reading (R3):** the repository at the PR's head and base, from Gitea's
archives, unpacked into a scratch folder and read in Python (`read_file`,
`list_files`, `search_code`), and its issues (`read_issue`,