Skip to content

Commit accbeb5

Browse files
authored
ci: add Claude Code issue triage bot (#31211)
Alternative to #31210
1 parent 515e261 commit accbeb5

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed

.github/workflows/issue_triage.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: AI Issue Triage
2+
3+
on:
4+
issues:
5+
types: [opened]
6+
7+
jobs:
8+
triage:
9+
if: github.event.issue.author_association != 'MEMBER' && github.event.issue.author_association != 'OWNER'
10+
runs-on: ubuntu-latest
11+
permissions:
12+
issues: write
13+
id-token: write
14+
steps:
15+
- uses: anthropics/claude-code-action@v1
16+
with:
17+
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
18+
prompt: |
19+
REPO: ${{ github.repository }}
20+
ISSUE NUMBER: ${{ github.event.issue.number }}
21+
TITLE: ${{ github.event.issue.title }}
22+
BODY: ${{ github.event.issue.body }}
23+
AUTHOR: ${{ github.event.issue.user.login }}
24+
25+
This is a new issue from an external contributor. Please analyze it and:
26+
27+
1. **Categorize the issue type**: Determine if it's a:
28+
- Bug report
29+
- Feature request/suggestion
30+
- Node.js compatibility problem
31+
- Question
32+
- Documentation issue
33+
- Performance issue
34+
- Other
35+
36+
2. **Assess completeness**: Check if the issue contains:
37+
- Clear description of the problem/request
38+
- Steps to reproduce (for bugs)
39+
- Expected vs actual behavior (for bugs)
40+
- Deno version and platform info (when relevant)
41+
- Minimal reproducible example (for bugs)
42+
43+
3. **Check for duplicates**: Search existing issues to see if this has been reported before:
44+
`gh search issues --repo denoland/deno [relevant keywords]`
45+
46+
4. **Suggest appropriate labels** based on:
47+
- Type: bug, feat, suggestion, question, docs
48+
- Platform: windows (if Windows-specific)
49+
- Node.js compatibility bug
50+
- Priority/Status: needs info, good first issue (for simple, well-defined bugs), etc.
51+
- Other: performance/perf, benchmarks, build, breaking change, tls, design limitation, etc.
52+
53+
5. **Add labels** using: `gh issue edit ${{ github.event.issue.number }} --add-label "label1,label2,label3"`, make sure to add "ai:triage" label.
54+
55+
6. **If the issue needs more information**, also add a comment requesting specific details needed for triage and the "needs info" label.
56+
57+
7. **If you find a likely duplicate**, post a comment mentioning the original issue(s) and add the "duplicate" label.
58+
59+
Be thorough but efficient. Focus on accurate categorization to help maintainers prioritize their work. Make sure that your
60+
comments includes this banner at the very end: "_This response is autogenerated and may contain mistakes._"
61+
62+
claude_args: |
63+
--allowedTools "Bash(gh issue:*),Bash(gh search:*)"

0 commit comments

Comments
 (0)