claude-code-review.yml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. name: Claude Code Review
  2. on:
  3. pull_request:
  4. types: [opened, synchronize, ready_for_review, reopened]
  5. # Optional: Only run on specific file changes
  6. # paths:
  7. # - "src/**/*.ts"
  8. # - "src/**/*.tsx"
  9. # - "src/**/*.js"
  10. # - "src/**/*.jsx"
  11. jobs:
  12. claude-review:
  13. # Optional: Filter by PR author
  14. # if: |
  15. # github.event.pull_request.user.login == 'external-contributor' ||
  16. # github.event.pull_request.user.login == 'new-developer' ||
  17. # github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'
  18. runs-on: ubuntu-latest
  19. permissions:
  20. contents: read
  21. pull-requests: read
  22. issues: read
  23. id-token: write
  24. steps:
  25. - name: Checkout repository
  26. uses: actions/checkout@v4
  27. with:
  28. fetch-depth: 1
  29. - name: Run Claude Code Review
  30. id: claude-review
  31. uses: anthropics/claude-code-action@v1
  32. with:
  33. claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
  34. plugin_marketplaces: 'https://github.com/anthropics/claude-code.git'
  35. plugins: 'code-review@claude-code-plugins'
  36. prompt: '/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}'
  37. # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
  38. # or https://code.claude.com/docs/en/cli-reference for available options