gerrit-integration
Capabilities
Agent-grade review loop for Gerrit.
| Tool | REST mapping |
|---|---|
gerrit_fetch_change | GET /changes/{id}/detail |
gerrit_get_diff | GET /changes/{id}/revisions/{rev}/patch |
gerrit_post_review | POST /changes/{id}/revisions/{rev}/review (Code-Review -2…+2) |
ask_user | Human confirmation (e.g., before -2) |
Typical flow
Code-Review label semantics
| Value | Meaning |
|---|---|
| +2 | Ship it (often maintainer-only) |
| +1 | Looks good, still needs another +2 |
| 0 | No vote |
| -1 | Issues worth discussing |
| -2 | Hard block |
Agents generally reserve -1/-2 for demonstrable severe defects with evidence.
Security & compliance
| Topic | Detail |
|---|---|
| Credentials | HTTP passwords or OAuth tokens via credential adapters |
| Tenant isolation | Separate secrets per tenant |
| Audit | Every post_review recorded |
| Safety | -2 flows should ask_user first |
Invocation
Examples:
- "Pull Gerrit change 87654"
- "Run a review and reply inline"
- "Vote -1 if there’s a serious bug"
Upgrade notes (legacy tenants)
| Change | Old | New | Action |
|---|---|---|---|
| Auto reply default | Webhooks auto-posted | auto_broadcast defaults off—must opt in | Enable in tenant config if you still want autonomous posts; otherwise treat as “review only, notify via IM” |
| Full-branch / full-repo review | Not promised historically | Gerrit adapter is change-scoped only | Use GitHub/GitLab paths or mirror to a plain git remote for repo-wide review |
| Webhook URLs | Raw URLs in old docs | Platform inbound channels issue URL + secret | Regenerate hooks—legacy URLs may be invalid |
Smoke-test with a +0 comment-only change before enabling
auto_broadcast.