add review type (perf, bug, security, ...) + fix tests
ci/woodpecker/push/tests Pipeline was successful

This commit is contained in:
2026-09-20 14:42:14 +00:00
parent be7284c6d8
commit fa03fd8589
8 changed files with 630 additions and 335 deletions
+11 -2
View File
@@ -51,11 +51,20 @@ Herald reviews pull requests inside an ephemeral
`GITEA_TOKEN` (so private repositories work), tells the model which files and
lines changed — additions and deletions, with the line numbers of the new and
old versions of the file respectively — then lets it explore the repository
with read-only tools (`ls`, `read_file`, `grep`, `find`) run inside the
container: the code itself is not sent, so the model reads it at those lines,
with read-only tools (`ls`, `file_size`, `read_file`, `grep`, `find`) run inside
the container: the code itself is not sent, so the model reads it at those lines,
4. posts the review, anchoring each comment on the added or removed line it
refers to, and removes the container and the temporary clone.
Generated files are left out of the changes handed to the model: lockfiles
(`Cargo.lock`, `package-lock.json`, `yarn.lock`, `go.sum`…) are machine-written
dependency churn whose thousands of lines would drown the code under review, and
they are never a place where a comment belongs.
Each comment is tagged with a severity — `bug`, `security`, `performance` or
`maintainability` — shown at the start of the comment, and the summary also lists
what the pull request does well.
Herald drives the container daemon through its socket: `DOCKER_HOST` (default
`unix:///var/run/docker.sock`), which covers both docker and podman's
Docker-compatible socket. The repository must contain a