Skip to content

fix(review): 评审 P0 修复——block-no-verify cluster bypass + 文档漂移 [v6.18.1] #16

fix(review): 评审 P0 修复——block-no-verify cluster bypass + 文档漂移 [v6.18.1]

fix(review): 评审 P0 修复——block-no-verify cluster bypass + 文档漂移 [v6.18.1] #16

Workflow file for this run

# Claude Code GitHub Action — template, NOT enabled by default.
#
# Enable when:
# - You want @claude mentions in PR comments to trigger the team
# - You want automated PR review on every push to a PR branch
# - You want a one-shot "fix it" agent kicked off by a PR comment
#
# To enable:
# 1. Install the Claude Code GitHub App: https://github.com/apps/claude-code
# 2. Add `ANTHROPIC_API_KEY` to repo secrets (Settings → Secrets and variables → Actions)
# 3. Rename this file from `claude-code.yml.template` to `claude-code.yml` if you renamed it
# 4. Tune the trigger filters and the `direct_prompt` body to match your team's workflow
#
# Cost guardrail: this workflow burns Anthropic API tokens on every trigger.
# Pair with `.claude/standards/cost-budget.md` and review monthly via `/usage` exports.
#
# Reference:
# - https://github.com/anthropics/claude-code-action
# - https://code.claude.com/docs/en/github-actions
name: Claude Code
on:
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]
pull_request:
types: [opened, synchronize]
# Only respond to @claude mentions OR PRs that touch code paths.
# Tune these matchers to your team's signal-to-noise tolerance.
jobs:
claude-mention:
if: |
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude'))
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
issues: write
steps:
- uses: actions/checkout@v4
- uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
# Inherit the project's `.claude/` config (agents, hooks, standards).
# Keep prompts short — the agent already has CLAUDE.md context.
direct_prompt: |
Respond to the @claude mention. Read CLAUDE.md and the relevant
`.claude/standards/*.md` files for guardrails. Stay within the
team's acceptance-criteria lifecycle (see ac-lifecycle.md).
claude-pr-review:
# Only auto-review PRs into main that have the `claude-review` label.
# Add the label manually to opt in — automatic review on every PR is
# expensive and noisy; explicit opt-in keeps cost predictable.
if: |
github.event_name == 'pull_request' &&
contains(github.event.pull_request.labels.*.name, 'claude-review')
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
direct_prompt: |
Review the diff in this pull request as the `code-reviewer` role
defined in `.claude/agents/code-reviewer.md`. Apply the OWASP
checklist from `.claude/standards/security.md`. Output the review
as a PR comment, NOT as commits or file edits — `code-reviewer`
is review-only.