Keysat e5a187b507 Walk the default branch first, and keep ssh noise out of the room
Rooms mapped before the push watch existed carry no default_branch, so
the "report a commit as being on master, not on some stale branch that
also contains it" ordering never applied to them. Look it up once and
keep it.

known_hosts lives in the image, so it resets on every rebuild and the
first ssh connection printed "Permanently added ... to the list of known
hosts" straight into the room, prepended to the first assessment. Set
LogLevel ERROR in the generated ssh config; real errors still come back.

Corrects two claims in Current state that the API contradicts: the repo
has had three PRs, not zero, and their review threads for #2 and #3 are
orphaned in the room right now.
2026-08-21 10:49:55 -05:00

gitea-review-bot

A thin Matrix bot that watches a Gitea repo from a Matrix room: it reviews and merges pull requests, and — opt-in — tells you when someone else pushes commits, with an assessment of what they did. One review room per repo. Separate from matrix-bridge (which runs interactive Claude Code sessions).

How it works

  1. Create a Matrix room named like a repo and invite the bot. It auto-joins and maps the room to <owner>/<repo> (and ~/Projects/<repo> on the Mac), then posts an onboarding message.
  2. It polls that repo's open PRs and posts each as a thread: a headless claude -p review (with an optional subagent panel) run on the Mac over SSH.
  3. In the thread: merge (then yes) or reject. A merge auto-deploys (if enabled) and then redacts the thread, so the room shows only open PRs; if the deploy fails, the thread still clears and a standalone "deploy manually" warning stays in the room. clear redacts an orphaned thread without touching the PR.
  4. Opt-in per repo, it also watches commits pushed by anyone but you (watch_pushes + [gitea] my_emails): a notice naming the author, branch, commits and files lands immediately, and a claude -p assessment follows as a threaded reply. expected_paths marks where that person's changes are expected; anything outside it is flagged in the notice.

Pick which review agents run per room in chat: agents +reviewer +security -adjudicator.

Run (on the Spark)

  1. Copy config.example.toml → config.toml and .env.example → .env; fill them in (Matrix creds, GITEA_TOKEN, the [mac] SSH alias + reused matrix-bridge wrapper paths, [gitea]).
  2. docker compose up -d --build. Logs: docker compose logs -f.

See AGENTS.md for the full design, placement, and decisions.

S
Description
No description provided
Readme
198 KiB
Languages
Python 97.2%
Shell 1.6%
Dockerfile 1.2%