プレイグラウンド、サンドボックス、使い捨てスクリプト置き場
0

Configure Feed

Select the types of activity you want to include in your feed.

Update Claude Code GitHub Workflow (#259)

authored by

Kohei Watanabe and committed by
GitHub
(Feb 27, 2026, 4:36 PM +0900) 2e03a72c 433983dc

+24 -45
+9 -43
.github/workflows/claude-code-review.yml
··· 2 2 3 3 on: 4 4 pull_request: 5 - types: [opened, synchronize] 5 + types: [opened, synchronize, ready_for_review, reopened] 6 6 # Optional: Only run on specific file changes 7 7 # paths: 8 8 # - "src/**/*.ts" ··· 17 17 # github.event.pull_request.user.login == 'external-contributor' || 18 18 # github.event.pull_request.user.login == 'new-developer' || 19 19 # github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' 20 - 20 + 21 21 runs-on: ubuntu-latest 22 22 permissions: 23 23 contents: read 24 24 pull-requests: read 25 25 issues: read 26 26 id-token: write 27 - 27 + 28 28 steps: 29 29 - name: Checkout repository 30 30 uses: actions/checkout@v4 ··· 33 33 34 34 - name: Run Claude Code Review 35 35 id: claude-review 36 - uses: anthropics/claude-code-action@beta 36 + uses: anthropics/claude-code-action@v1 37 37 with: 38 38 claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} 39 - 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: | 45 - Please review this pull request and provide feedback on: 46 - - Code quality and best practices 47 - - Potential bugs or issues 48 - - Performance considerations 49 - - Security concerns 50 - - Test coverage 51 - 52 - Be constructive and helpful in your feedback. 53 - 54 - # Optional: Use sticky comments to make Claude reuse the same comment on subsequent pushes to the same PR 55 - # use_sticky_comment: true 56 - 57 - # Optional: Customize review based on file types 58 - # direct_prompt: | 59 - # Review this PR focusing on: 60 - # - For TypeScript files: Type safety and proper interface usage 61 - # - For API endpoints: Security, input validation, and error handling 62 - # - For React components: Performance, accessibility, and best practices 63 - # - For tests: Coverage, edge cases, and test quality 64 - 65 - # Optional: Different prompts for different authors 66 - # direct_prompt: | 67 - # ${{ github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' && 68 - # 'Welcome! Please review this PR from a first-time contributor. Be encouraging and provide detailed explanations for any suggestions.' || 69 - # 'Please provide a thorough code review focusing on our coding standards and best practices.' }} 70 - 71 - # Optional: Add specific tools for running tests or linting 72 - # allowed_tools: "Bash(npm run test),Bash(npm run lint),Bash(npm run typecheck)" 73 - 74 - # Optional: Skip review for certain conditions 75 - # if: | 76 - # !contains(github.event.pull_request.title, '[skip-review]') && 77 - # !contains(github.event.pull_request.title, '[WIP]') 39 + plugin_marketplaces: 'https://github.com/anthropics/claude-code.git' 40 + plugins: 'code-review@claude-code-plugins' 41 + prompt: '/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}' 42 + # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md 43 + # or https://code.claude.com/docs/en/cli-reference for available options 78 44
+15 -2
.github/workflows/claude.yml
··· 23 23 pull-requests: read 24 24 issues: read 25 25 id-token: write 26 - actions: read 26 + actions: read # Required for Claude to read CI results on PRs 27 27 steps: 28 28 - name: Checkout repository 29 - uses: actions/checkout@v6 29 + uses: actions/checkout@v4 30 30 with: 31 31 fetch-depth: 1 32 32 ··· 35 35 uses: anthropics/claude-code-action@v1 36 36 with: 37 37 claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} 38 + 39 + # This is an optional setting that allows Claude to read CI results on PRs 40 + additional_permissions: | 41 + actions: read 42 + 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.' 45 + 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://code.claude.com/docs/en/cli-reference for available options 49 + # claude_args: '--allowed-tools Bash(gh pr:*)' 50 +