mirror of
https://github.com/trailofbits/algo.git
synced 2026-09-07 10:17:47 +02:00
fa40d7e611
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.3.1 to 6.0.0. - [Release notes](https://github.com/actions/checkout/releases) - [Commits](https://github.com/actions/checkout/compare/v4.3.1...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 6.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
67 lines
2.9 KiB
YAML
67 lines
2.9 KiB
YAML
---
|
|
name: Claude Code Review
|
|
|
|
'on':
|
|
pull_request:
|
|
types: [opened, synchronize]
|
|
# Optional: Only run on specific file changes
|
|
# paths:
|
|
# - "src/**/*.ts"
|
|
# - "src/**/*.tsx"
|
|
# - "src/**/*.js"
|
|
# - "src/**/*.jsx"
|
|
|
|
jobs:
|
|
claude-review:
|
|
# Optional: Filter by PR author
|
|
# if: |
|
|
# github.event.pull_request.user.login == 'external-contributor' ||
|
|
# github.event.pull_request.user.login == 'new-developer' ||
|
|
# github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'
|
|
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
pull-requests: read
|
|
issues: read
|
|
id-token: write
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v6.0.0
|
|
with:
|
|
fetch-depth: 1
|
|
|
|
- name: Run Claude Code Review
|
|
id: claude-review
|
|
uses: anthropics/claude-code-action@v1
|
|
with:
|
|
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
|
|
use_sticky_comment: true
|
|
prompt: |
|
|
REPO: ${{ github.repository }}
|
|
PR NUMBER: ${{ github.event.pull_request.number }}
|
|
|
|
IMPORTANT: Before posting your review, minimize any previous review comments from yourself to avoid cluttering the PR:
|
|
1. List existing comments: gh api repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments
|
|
2. Find comments from "github-actions[bot]" that contain "Code Review" or review-related content in the body
|
|
3. For each such comment, minimize it as OUTDATED using:
|
|
gh api graphql -f query='mutation($id: ID!) { minimizeComment(input: {subjectId: $id, classifier: OUTDATED}) { minimizedComment { isMinimized } } }' -f id="<node_id>"
|
|
|
|
Then review this pull request and provide feedback on:
|
|
- Code quality and best practices
|
|
- Potential bugs or issues
|
|
- Performance considerations
|
|
- Security concerns
|
|
- Test coverage
|
|
|
|
Use the repository's CLAUDE.md for guidance on style and conventions. Be constructive and helpful in your feedback.
|
|
|
|
Use `gh pr comment` with your Bash tool to leave your review as a comment on the PR.
|
|
|
|
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
|
|
# or https://docs.claude.com/en/docs/claude-code/cli-reference for available options
|
|
# Note: gh api is needed for minimizing old comments (workaround for broken use_sticky_comment)
|
|
# See: https://github.com/anthropics/claude-code-action/issues/419
|
|
claude_args: '--allowed-tools "Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*),Bash(gh api:*),Bash(ansible-playbook * --syntax-check),Bash(ansible-lint *),Bash(ruff check *),Bash(yamllint *),Bash(shellcheck *),Bash(python -m pytest *)"'
|