Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 16 additions & 8 deletions .github/workflows/claude-code-review.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Claude Code Review

on:
Expand All @@ -17,14 +18,14 @@ jobs:
# 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@v4
Expand Down Expand Up @@ -132,21 +133,28 @@ jobs:

# Use sticky comments to make Claude reuse the same comment on subsequent pushes to the same PR
use_sticky_comment: true

# Optional: Customize review based on file types
# direct_prompt: |
# Review this PR focusing on:
# - For TypeScript files: Type safety and proper interface usage
# - For API endpoints: Security, input validation, and error handling
# - For React components: Performance, accessibility, and best practices
# - For tests: Coverage, edge cases, and test quality

# Optional: Different prompts for different authors
# direct_prompt: |
# ${{ github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' &&
# ${{ github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' &&
# 'Welcome! Please review this PR from a first-time contributor. Be encouraging and provide detailed explanations for any suggestions.' ||
# 'Please provide a thorough code review focusing on our coding standards and best practices.' }}

# Allow specific tools for validation and testing
allowed_tools: "Bash(bash -n scripts/*.sh),Bash(./tests/test_*.sh),Bash(yamllint .github/workflows/*.yml)"

# Allow specific tools for validation and testing
allowed_tools: |
Bash(eslint docs/dashboard/js/*.js),
Bash(djlint --check docs/dashboard/*.html),
Bash(shellcheck scripts/*.sh tests/*.sh),
Bash(yamllint -c .yamllint.yml .github/workflows/*.yml config/*.yml),
Bash(actionlint .github/workflows/*.yml),
Bash(markdownlint *.md docs/*.md),
Bash(make lint),
Bash(./tests/test_*.sh)