claude-code-review.yml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. name: Claude Code Review
  2. on:
  3. pull_request:
  4. types: [opened, synchronize, ready_for_review, reopened]
  5. jobs:
  6. claude-review:
  7. # Only run for PRs submitted by organization members or owners
  8. if: |
  9. github.repository == 'netbox-community/netbox' &&
  10. (github.event.pull_request.author_association == 'MEMBER' ||
  11. github.event.pull_request.author_association == 'OWNER')
  12. runs-on: ubuntu-latest
  13. permissions:
  14. contents: read
  15. pull-requests: read
  16. issues: read
  17. id-token: write
  18. steps:
  19. - name: Checkout repository
  20. uses: actions/checkout@v4
  21. with:
  22. fetch-depth: 1
  23. - name: Run Claude Code Review
  24. id: claude-review
  25. uses: anthropics/claude-code-action@e763fe78de2db7389e04818a00b5ff8ba13d1360 # v1
  26. with:
  27. claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
  28. plugin_marketplaces: 'https://github.com/anthropics/claude-code.git'
  29. plugins: 'code-review@claude-code-plugins'
  30. prompt: '/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}'
  31. # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
  32. # or https://code.claude.com/docs/en/cli-reference for available options