Skip to content

Commit 30d2d96

Browse files
committed
Merge branch 'main' into command-publish
2 parents f6c3d6d + 3b51e6c commit 30d2d96

File tree

2 files changed

+22
-49
lines changed

2 files changed

+22
-49
lines changed

.github/workflows/claude-code-review.yml

Lines changed: 10 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -33,42 +33,24 @@ jobs:
3333

3434
- name: Run Claude Code Review
3535
id: claude-review
36-
uses: anthropics/claude-code-action@beta
36+
uses: anthropics/claude-code-action@v1
3737
with:
38-
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
38+
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
39+
prompt: |
40+
REPO: ${{ github.repository }}
41+
PR NUMBER: ${{ github.event.pull_request.number }}
3942
40-
# Optional: Specify model (defaults to Claude Sonnet 4, uncomment for Claude Opus 4)
41-
# model: "claude-opus-4-20250514"
42-
43-
# Direct prompt for automated review (no @claude mention needed)
44-
direct_prompt: |
4543
Please review this pull request and provide feedback on:
4644
- Code quality and best practices
4745
- Potential bugs or issues
4846
- Performance considerations
4947
- Security concerns
5048
- Test coverage
5149
52-
Be constructive and helpful in your feedback.
53-
54-
# Optional: Customize review based on file types
55-
# direct_prompt: |
56-
# Review this PR focusing on:
57-
# - For TypeScript files: Type safety and proper interface usage
58-
# - For API endpoints: Security, input validation, and error handling
59-
# - For React components: Performance, accessibility, and best practices
60-
# - For tests: Coverage, edge cases, and test quality
61-
62-
# Optional: Different prompts for different authors
63-
# direct_prompt: |
64-
# ${{ github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' &&
65-
# 'Welcome! Please review this PR from a first-time contributor. Be encouraging and provide detailed explanations for any suggestions.' ||
66-
# 'Please provide a thorough code review focusing on our coding standards and best practices.' }}
50+
Use the repository's CLAUDE.md for guidance on style and conventions. Be constructive and helpful in your feedback.
6751
68-
# Optional: Add specific tools for running tests or linting
69-
# allowed_tools: "Bash(npm run test),Bash(npm run lint),Bash(npm run typecheck)"
52+
Use `gh pr comment` with your Bash tool to leave your review as a comment on the PR.
7053
71-
# Optional: Skip review for certain conditions
72-
# if: |
73-
# !contains(github.event.pull_request.title, '[skip-review]') &&
74-
# !contains(github.event.pull_request.title, '[WIP]')
54+
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
55+
# or https://docs.claude.com/en/docs/claude-code/cli-reference for available options
56+
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:*)"'

.github/workflows/claude.yml

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
pull-requests: read
2424
issues: read
2525
id-token: write
26+
actions: read # Required for Claude to read CI results on PRs
2627
steps:
2728
- name: Checkout repository
2829
uses: actions/checkout@v4
@@ -31,28 +32,18 @@ jobs:
3132

3233
- name: Run Claude Code
3334
id: claude
34-
uses: anthropics/claude-code-action@beta
35+
uses: anthropics/claude-code-action@v1
3536
with:
36-
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
37+
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
3738

38-
# Optional: Specify model (defaults to Claude Sonnet 4, uncomment for Claude Opus 4)
39-
# model: "claude-opus-4-20250514"
39+
# This is an optional setting that allows Claude to read CI results on PRs
40+
additional_permissions: |
41+
actions: read
4042
41-
# Optional: Customize the trigger phrase (default: @claude)
42-
# trigger_phrase: "/claude"
43+
# Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it.
44+
# prompt: 'Update the pull request description to include a summary of changes.'
4345

44-
# Optional: Trigger when specific user is assigned to an issue
45-
# assignee_trigger: "claude-bot"
46-
47-
# Optional: Allow Claude to run specific commands
48-
# allowed_tools: "Bash(npm install),Bash(npm run build),Bash(npm run test:*),Bash(npm run lint:*)"
49-
50-
# Optional: Add custom instructions for Claude to customize its behavior for your project
51-
# custom_instructions: |
52-
# Follow our coding standards
53-
# Ensure all new code has tests
54-
# Use TypeScript for new files
55-
56-
# Optional: Custom environment variables for Claude
57-
# claude_env: |
58-
# NODE_ENV: test
46+
# Optional: Add claude_args to customize behavior and configuration
47+
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
48+
# or https://docs.claude.com/en/docs/claude-code/cli-reference for available options
49+
# claude_args: '--allowed-tools Bash(gh pr:*)'

0 commit comments

Comments
 (0)