用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/pigweed-project/pigweed --skill gerrit命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Pigweed oncall rotation runbooks and maintenance workflows (such as rolling CIPD client tools for b/315378787). DO NOT auto-load during normal coding tasks. Only load when explicitly triggered by the user via the `/oncall` or `/roll-cipd` slash command.
Best practices for pw_async2 development and testing, covering futures, values, tasks, dispatchers, polling, and coroutines.
Use for ALL documentation-related workflows: rst style guide, changelog updates, C/C++ API reference (Doxygen)
正在显示 SKILL.md
| name | Gerrit |
| description | Helps with tasks related to Gerrit and Buildbucket. |
This document summarizes the tricks and methods discovered for interacting with Gerrit and Buildbucket programmatically and via CLI in the Pigweed environment.
Pigweed uses LUCI Buildbucket for checks. You can query the status of builds for a specific CL and patchset without using the Gerrit UI.
To query the status of all Buildbucket checks for a patchset (including handling pagination and deduplicating retries to keep only the latest run for each builder), use the provided Python helper script:
python3 .agents/skills/gerrit/scripts/search_builds.py <CHANGE_ID> <PATCHSET_ID>
Or with a Gerrit URL:
python3 .agents/skills/gerrit/scripts/search_builds.py <GERRIT_URL>
pw_presubmit invocation reporting separately) and other robot/linter
plugins (e.g., AyeAye linter comments, SLSA policy checks). The
Buildbucket query focuses specifically on top-level infrastructure
builders that can be individually triggered or retried via bb add.To get specific logs for a build:
https://cr-buildbucket.appspot.com/prpc/buildbucket.v2.Builds/GetBuildPOST{
"id": "<BUILD_ID>",
"fields": "steps"
}
Note: Requesting the steps field returns viewUrl links to logs in
LogDog for each step.bb CLI)The bb CLI tool is used to interact with Buildbucket builders directly. Note
that bb is made ambiently available on $PATH by bootstrapping or activating
the Pigweed environment:
source bootstrap.sh # or: source activate.sh
bb is still not installed and cipd is available, download it using
cipd export:
# e.g., platform can be mac-arm64, mac-amd64, linux-amd64
echo 'infra/tools/bb/${platform} latest' | \
cipd export -root /path/to/install -ensure-file -
bb auth-login in their own
interactive terminal first. Use bb auth-info to verify the active login
state.When addressing failed checks on a CL, follow this resource-efficient workflow:
bb add): Initially, trigger only the
specific checks that failed using the bb CLI to quickly verify the
fix without wasting CI resources on the whole suite.bb CLI (Specific Builders)To trigger a specific check manually after it has been scheduled or failed:
bb add -cl \
https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/<CHANGE_ID>/<PATCHSET_ID> \
pigweed/pigweed.try/<BUILDER_NAME>
Example:
bb add -cl \
https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/404076/4 \
pigweed/pigweed.try/pigweed-mac-arm-vscode
You can trigger all CQ checks (Dry Run) on the current patchset by setting
the Commit-Queue label to 1 via the Gerrit REST API using the user's local
git cookies:
curl -sb ~/.gitcookies -X POST \
-H "Content-Type: application/json" \
-d '{"labels": {"Commit-Queue": 1}}' \
"https://pigweed-review.googlesource.com/a/changes/<CHANGE_ID>/revisions/current/review"
You can trigger a dry run when pushing to Gerrit by setting the
Commit-Queue label:
git push origin HEAD:refs/for/main%l=Commit-Queue+1
Or using the -o option:
git push origin HEAD:refs/for/main -o l=Commit-Queue+1
.../changes/<ID>/jwts requires a
logged-in session.signature check error: unknown signing key.bb CLI Authbb tool requires authentication via bb auth-login.bb auth-info to verify if the active account
details and OAuth scopes are valid.bb auth-login cannot be run by the AI agent
directly because it requires an interactive terminal (TTY) to proceed
with the login flow.bb auth-login in their own interactive
terminal first. Once authenticated, the agent can use the bb CLI tool
successfully.To get open comments on a change:
https://pigweed-review.googlesource.com/changes/<CHANGE_ID>/commentsGET"unresolved": true and for the
latest patch_set.comments-<CHANGE_ID>.md) with checkboxes
for each unresolved comment.