diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml new file mode 100644 index 0000000000..29412469ef --- /dev/null +++ b/.github/workflows/claude.yml @@ -0,0 +1,42 @@ +name: Claude Code + +on: + issues: + types: [opened] + +jobs: + analyze: + if: github.repository == 'voidzero-dev/vite-plus' + runs-on: ubuntu-slim + permissions: + contents: read + issues: write + id-token: write + + steps: + - name: Checkout repository + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + fetch-depth: 10 + persist-credentials: true + + - name: Run Claude Code + id: claude + uses: anthropics/claude-code-action@26ec041249acb0a944c0a47b6c0c13f05dbc5b44 # v1.0.70 + with: + claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} + claude_args: --allowedTools "Read,Glob,Grep,Bash(gh:*),Bash(cargo:*),Bash(git:*),WebFetch" + issue_number: ${{ github.event.issue.number }} + prompt: | + Analyze the linked issue and determine if it can be fixed. + + 1. Search the codebase to gather relevant context (related files, existing implementations, tests) + 2. Determine if the issue is fixable and estimate the complexity + + Post a comment on the issue with: + - A brief summary of your understanding of the issue + - Relevant files/code you found + - Whether this issue is fixable (yes/no/needs clarification) + - If the issue is unclear, ask for more context + - If fixable, provide a concrete implementation plan with specific steps + - Any potential concerns or blockers