This release is a pre-release and may not be stable for production use.
hermes-gerrit
A Gerrit code-review platform adapter for the Hermes
Agent gateway. It connects to
a Gerrit SSH endpoint, streams gerrit stream-events, and exposes
five review tools (fetch_diff, fetch_file, fetch_change,
inline_comment, review). Stream + writes go over SSH; reads use
Gerrit's public REST API. Mirrors the contract of the existing
OpenClaw Gerrit channel plugin so prompts and docs read the same
regardless of which adapter the agent is running on.
Status
Pre-1.0. Spec-locked 2026-05-05. Implementation in progress; see the
patch series plan in
doc/source/developer/specs/hermes-gerrit-adapter.rst.
Installation
PyPI (production):
pip install hermes-gerrit
That's it. Hermes discovers the plugin via the hermes_agent.plugins
entry-point group — no plugin.yaml required.
Dev / clone path:
Symlink (or check out) this repo into ~/.hermes/plugins/gerrit/:
git clone https://opendev.org/inaugust/hermes-gerrit ~/.hermes/plugins/gerrit
The plugin.yaml at the repo root is what the dev/clone path uses to
discover the plugin.
hermes-agent itself must be installed separately — it is not a
runtime dependency of this package.
Required environment
| Variable | Purpose |
|---|---|
GERRIT_SERVER |
Gerrit SSH host (e.g. review.opendev.org) |
GERRIT_USER |
SSH username |
GERRIT_SSHKEY |
Path to the private SSH key to authenticate with |
Read tools (fetch_diff, fetch_file, fetch_change) hit Gerrit's
public REST API at https://${GERRIT_SERVER}/... with no
authentication; only the SSH key is required, and only for
stream-events and writes (inline_comment, review).
Required Gerrit account permissions
The Gerrit account whose SSH key you give the adapter must have:
- SSH access (the
Stream Eventscapability is server-wide; ask your Gerrit admin ifgerrit stream-eventsrejects you). label-Code-Reviewpermission in the relevant project'srefs/heads/*ACL, with a range that includes-1..+1. The adapter hard-clamps Code-Review votes to ±1 — never +2/-2.- No
label-Verifiedorlabel-Workflowpermissions are needed — those labels are hard-zeroed in code (only Zuul votes Verified, only humans set Workflow).
Configuration
Multi-account, mirrored from the TS plugin's
channels.gerrit.accounts.<id> shape. In hermes' platform config:
gateway:
platforms:
gerrit:
enabled: true
extra:
accounts:
opendev:
host: review.opendev.org
port: 29418
username: my-bot
sshKeyPath: ~/.ssh/id_ed25519
allowFrom:
- alice
- bob
projects:
- openstack/nova
- openstack/keystone
mentionNames:
- my-bot
enabled: true
The projects allowlist is mandatory — see the safety section of the
spec for why an empty/missing allowlist must fail validation rather
than silently watch nothing.
Tests
pip install -e .
pip install -r test-requirements.txt
pytest -q
Documentation
Build the docs locally with:
nox -s docs
Output lands in doc/build/html/.
Spec
The authoritative design doc is
doc/source/developer/specs/hermes-gerrit-adapter.rst.
Every implementation patch in this repository traces back to a
decision in that file.
License
GPL-3.0-or-later. See LICENSE.
Release files for hermes-gerrit 0.0.1.dev26
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| hermes_gerrit-0.0.1.dev26.tar.gz | 126.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hermes_gerrit-0.0.1.dev26-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 178.1 kB
Release files / hermes_gerrit-0.0.1.dev26.tar.gz
| Download URL | hermes_gerrit-0.0.1.dev26.tar.gz |
|---|---|
| Size | 126.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bbe7ad5318c813506d772d17f4894975d6a4f608d9f67bb8033c1ad1625ecc24
|
|
BLAKE2b-256 checksum How to use checksums |
7ba6699b3db86ed19389cb0d8fe22c9ba299206913009921faf0d0fb36b793f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.9
|
Release files / hermes_gerrit-0.0.1.dev26-py3-none-any.whl
| Download URL | hermes_gerrit-0.0.1.dev26-py3-none-any.whl |
|---|---|
| Size | 51.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6a94b883754f137e035ca56b84c1380815478aa6b58ec9795ff6e0eaa74acfe2
|
|
BLAKE2b-256 checksum How to use checksums |
4d460a2ef2a7e74ef32776a6bb25f9f65dbdb3264e54c2345b2f1359d57a6c3a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.9
|