File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Claude Issue Autolabeling
2+
3+ on :
4+ issues :
5+ types : [opened]
6+
7+ jobs :
8+ autolabel :
9+ runs-on : ubuntu-latest
10+ permissions :
11+ issues : write
12+ contents : read
13+ steps :
14+ - name : Checkout repository
15+ uses : actions/checkout@v4
16+
17+ - name : Get Repository Labels
18+ id : labels
19+ run : |
20+ labels=$(gh label list --limit 100 --json name,description --jq 'map("\(.name) (\(.description))") | join(", ")')
21+ echo "available_labels=$labels" >> $GITHUB_OUTPUT
22+ env :
23+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
24+
25+ - name : Autolabel Issue
26+ uses : anthropics/claude-code-action@beta
27+ with :
28+ anthropic_api_key : ${{ secrets.CLAUDE_CODE_ANTHROPIC_API_KEY }}
29+ timeout_minutes : " 5"
30+ direct_prompt : |
31+ Analyze this newly created issue and perform two tasks:
32+
33+ 1. **Apply labels** from these available repository labels:
34+ ${{ steps.labels.outputs.available_labels }}
35+
36+ 2. **Add a comment** with:
37+ - **TLDR**: One sentence summary
38+ - **Work Summary**: Brief description of what needs to be done
39+ - **Label Reasoning**: Why you chose these labels (or why no labels apply)
40+
41+ Requirements:
42+ - Apply ALL relevant labels that match the issue content
43+ - If no labels are truly relevant, apply NO labels at all
44+ - Be thorough but precise - don't force labels that don't fit
45+ - Keep comment concise and helpful
46+
47+ Issue Title: ${{ github.event.issue.title }}
48+ Issue Body: ${{ github.event.issue.body }}
You can’t perform that action at this time.
0 commit comments