Skip to content

Commit d11e13d

Browse files
Boshenclaude
andcommitted
ci: add Claude issue triage workflow for bug reports
Adds a GitHub Actions workflow that triggers Claude Code to analyze newly opened bug issues. Includes security hardening: no user-controlled string interpolation in prompts, shallow clone, no persisted credentials, and read-only tool permissions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 57dfd6a commit d11e13d

1 file changed

Lines changed: 44 additions & 0 deletions

File tree

.github/workflows/claude.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Claude Code
2+
3+
on:
4+
issues:
5+
types: [opened]
6+
7+
jobs:
8+
analyze:
9+
if: >-
10+
github.repository == 'voidzero-dev/vite-plus' &&
11+
contains(github.event.issue.labels.*.name, 'bug')
12+
runs-on: ubuntu-slim
13+
permissions:
14+
contents: read
15+
issues: write
16+
id-token: write
17+
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
21+
with:
22+
fetch-depth: 1
23+
persist-credentials: false
24+
25+
- name: Run Claude Code
26+
id: claude
27+
uses: anthropics/claude-code-action@26ec041249acb0a944c0a47b6c0c13f05dbc5b44 # v1.0.70
28+
with:
29+
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
30+
claude_args: --allowedTools "Read,Glob,Grep,Bash(gh:*),Bash(cargo:*),Bash(git:*),WebFetch"
31+
issue_number: ${{ github.event.issue.number }}
32+
prompt: |
33+
Analyze the linked issue and determine if it can be fixed.
34+
35+
1. Search the codebase to gather relevant context (related files, existing implementations, tests)
36+
2. Determine if the issue is fixable and estimate the complexity
37+
38+
Post a comment on the issue with:
39+
- A brief summary of your understanding of the issue
40+
- Relevant files/code you found
41+
- Whether this issue is fixable (yes/no/needs clarification)
42+
- If the issue is unclear, ask for more context
43+
- If fixable, provide a concrete implementation plan with specific steps
44+
- Any potential concerns or blockers

0 commit comments

Comments
 (0)