Skip to content

cloudthinker-ai/CloudSkills / skills/connections/managing-gerrit

managing-gerrit

Verified

Use when working with Gerrit — gerrit code review system management including change review workflows, submit rules, label configuration, group permissions, and Prolog-based submit rules. Use when managing Gerrit review policies, change management, and approval workflows.

Managing Gerrit

Overview

Manage Gerrit code review workflows, including change review processes, submit rules, label definitions, project permissions, and reviewer configuration.

Key Capabilities

  • Configure review labels (Code-Review, Verified, custom labels)
  • Define submit rules using Prolog or simple configuration
  • Manage project access controls and group permissions
  • Set up change submission requirements and strategies
  • Configure reviewer suggestions and attention sets
  • Manage topic-based change grouping and submission

Workflow

1 — Label Configuration

REVIEW LABELS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[ ] Code-Review:
    -2  This shall not be merged
    -1  I would prefer this is not merged as is
     0  No score
    +1  Looks good to me, but someone else must approve
    +2  Looks good to me, approved
[ ] Verified:
    -1  Fails
     0  No score
    +1  Verified
[ ] Custom labels:
    Label: ___  Range: ___ to ___

2 — Submit Rules

SUBMIT REQUIREMENTS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[ ] Required labels for submit:
    - Code-Review: +2 (at least one)
    - Code-Review: no -2 (block on negative)
    - Verified: +1
[ ] Submit type: merge / rebase / cherry-pick / fast-forward
[ ] Author must not self-approve: YES / NO
[ ] Require all inline comments resolved: YES / NO

3 — Project Access Control

ACCESS CONTROL
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[ ] Groups:
    - Developers: push, code-review -1..+1
    - Senior Devs: code-review -2..+2
    - CI System: verified -1..+1
    - Project Leads: submit, abandon
[ ] Branch permissions:
    refs/heads/main: restricted push
    refs/heads/*: allow push for Developers
[ ] Inherit from parent project: YES / NO

4 — Reviewer Configuration

REVIEWER SETUP
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[ ] Default reviewers by path:
    src/api/**     -> backend-reviewers
    src/ui/**      -> frontend-reviewers
    *.proto        -> api-reviewers
[ ] Attention set management: auto / manual
[ ] Reviewer suggestions enabled: YES / NO

Common Operations

Query Open Changes

List open changes pending review, filter by project, branch, or reviewer.

Submit Rule Validation

Test submit rules against pending changes to verify policy compliance.

Access Control Audit

Review project permissions to ensure least-privilege access.

Troubleshooting

IssueCauseFix
Cannot submit changeMissing required label scoreCheck submit requirements for all labels
Reviewer cannot +2Insufficient permissionsAdd user to group with Code-Review +2 range
Submit rule not appliedProlog syntax errorValidate rules.pl in project refs/meta/config
Change stuck in reviewAttention set staleUpdate attention set to notify appropriate reviewer

Output Format

Present results as a structured report:

Managing Gerrit Report
══════════════════════
Resources discovered: [count]

Resource       Status    Key Metric    Issues
──────────────────────────────────────────────
[name]         [ok/warn] [value]       [findings]

Summary: [total] resources | [ok] healthy | [warn] warnings | [crit] critical
Action Items: [list of prioritized findings]

Target ≤50 lines of output. Use tables for multi-resource comparisons.

Anti-Hallucination Rules

  1. NEVER assume resource names — always discover via CLI/API in Phase 1 before referencing in Phase 2.
  2. NEVER fabricate metric names or dimensions — verify against the service documentation or --help output.
  3. NEVER mix CLI commands between service versions — confirm which version/API you are targeting.
  4. ALWAYS use the discovery → verify → analyze chain — every resource referenced must have been discovered first.
  5. ALWAYS handle empty results gracefully — an empty response is valid data, not an error to retry.

Counter-Rationalizations

ShortcutCounterWhy
"I'll skip discovery and check known resources"Always run Phase 1 discovery firstResource names change, new resources appear — assumed names cause errors
"The user only asked for a quick check"Follow the full discovery → analysis flowQuick checks miss critical issues; structured analysis catches silent failures
"Default configuration is probably fine"Audit configuration explicitlyDefaults often leave logging, security, and optimization features disabled
"Metrics aren't needed for this"Always check relevant metrics when availableAPI/CLI responses show current state; metrics reveal trends and intermittent issues
"I don't have access to that"Try the command and report the actual errorAssumed permission failures prevent useful investigation; actual errors are informative
receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementationStars: 319kUpdated Claude CodeCodexVerifiedInstall
requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirementsStars: 319kUpdated Claude CodeCodexVerifiedInstall
using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallbackStars: 319kUpdated Claude CodeCodexVerifiedInstall
verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions alwaysStars: 319kUpdated Claude CodeCodexVerifiedInstall