← 返回
未分类 Key 中文

gerritaction

Query Gerrit accounts, changes, groups, or projects and perform actions like adding reviewers, approving, submitting, or deleting changes via the Gerrit API.
通过Gerrit API查询账户、变更、组或项目,执行添加审查者、审批、提交或删除变更等操作。
craftslab craftslab 来源
未分类 clawhub v0.1.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 609
下载
💾 0
安装
1
版本
#latest

概述

Gerrit Action Skill

Use the gerritaction worker to query Gerrit resources and apply actions to matching changes through the Gerrit API.

When to use

Use this skill when the user wants to:

  • query Gerrit accounts
  • query Gerrit changes
  • query Gerrit groups
  • query Gerrit projects
  • add or delete reviewers on matching changes
  • add or remove attention set members on matching changes
  • approve, submit, or delete matching changes

Worker configuration

The worker is configured by skill/config.yml:

apiVersion: v1
kind: worker
metadata:
	name: gerritaction
spec:
	gerrit:
		host: http://127.0.0.1/
		port: 8080
		user: user
		pass: pass

Required fields:

  • apiVersion: v1
  • kind: worker
  • metadata.name: gerritaction
  • spec.gerrit.host: Gerrit base URL including scheme
  • spec.gerrit.port: Gerrit port
  • spec.gerrit.user: Gerrit username
  • spec.gerrit.pass: Gerrit password

Invocation rules

  • Install the package with pip install gerritaction before running commands.
  • Invoke the CLI as gerritaction instead of python action.py.
  • Always provide --config-file with a .yml or .yaml file.
  • Provide exactly one query selector: --account-query, --change-query, --group-query, or --project-query.
  • Only use --change-action together with --change-query in the same invocation.
  • Use --output-file only for a new .json file path. The command rejects an existing file.
  • If --output-file is omitted, query results are printed to standard output as JSON.

Supported queries

Account query

Use --account-query to search accounts.

Example:

pip install gerritaction
gerritaction --config-file="skill/config.yml" --account-query="name:john email:example.com"

Change query

Use --change-query to search changes.

Example:

pip install gerritaction
gerritaction --config-file="skill/config.yml" --change-query="status:open since:2024-01-01 until:2024-01-02"

Group query

Use --group-query to search groups.

Example:

pip install gerritaction
gerritaction --config-file="skill/config.yml" --group-query="name:admin member:john"

Project query

Use --project-query to search projects. Project results are enriched with project config, branches, and tags.

Example:

pip install gerritaction
gerritaction --config-file="skill/config.yml" --project-query="name:test state:active"

Supported change actions

The worker supports these change actions:

  • add-reviewer:account-id[,account-id...]
  • delete-reviewer:account-id[,account-id...]
  • add-attention:account-id[,account-id...]
  • remove-attention:account-id[,account-id...]
  • approve-change:Label=Value[,Label=Value...]
  • delete-change
  • submit-change

Multiple actions can be chained in one --change-action value, separated by spaces.

Example:

pip install gerritaction
gerritaction \
	--config-file="skill/config.yml" \
	--change-query="status:open project:test" \
	--change-action="add-reviewer:1001,1002 approve-change:Code-Review=+2"

Output handling

  • Use --output-file when the caller needs a persistent JSON artifact.
  • Account, change, group, and project queries return JSON.
  • Change actions operate on the changes returned by --change-query.

Example:

pip install gerritaction
gerritaction \
	--config-file="skill/config.yml" \
	--project-query="name:test state:active" \
	--output-file="/tmp/projects.json"

Safety guidance

  • Prefer a query-only run before destructive or state-changing actions.
  • Before delete-change or submit-change, make sure the change query is narrow and explicit.
  • If the user request is ambiguous, ask for the exact Gerrit query or target account IDs before generating the final command.

Recommended behavior for the agent

  • Generate commands that match the repository CLI exactly.
  • Keep queries and actions explicit rather than inferred.
  • When performing change actions, include both --change-query and --change-action in the same command.
  • When the user asks for structured output, add --output-file with a new .json path.
  • Surface invalid combinations early, especially a --change-action without --change-query.

版本历史

共 1 个版本

  • v0.1.0 当前
    2026-05-02 09:28 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

dev-programming

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 677 📥 325,817
dev-programming

YouTube

byungkyu
使用托管OAuth集成YouTube Data API,支持搜索视频、管理播放列表、获取频道数据及评论互动,适用于用户需要时使用此技能。
★ 142 📥 41,397
dev-programming

Mcporter

steipete
使用 mcporter CLI 直接列出、配置、认证及调用 MCP 服务器/工具(支持 HTTP 或 stdio),涵盖临时服务器、配置编辑及 CLI/类型生成功能。
★ 195 📥 67,418