mirror of
https://github.com/anthropics/claude-code.git
synced 2026-04-22 03:59:35 +00:00
Extract triage prompt into /triage-issue command and use a dedicated edit-issue-labels.sh script for label operations instead of raw gh issue edit. The script validates labels against the repo's existing labels before applying them.
39 lines
1.1 KiB
YAML
39 lines
1.1 KiB
YAML
name: Claude Issue Triage
|
|
on:
|
|
issues:
|
|
types: [opened]
|
|
issue_comment:
|
|
types: [created]
|
|
|
|
jobs:
|
|
triage-issue:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
if: >-
|
|
github.event_name == 'issues' ||
|
|
(github.event_name == 'issue_comment' && !github.event.issue.pull_request && github.event.comment.user.type != 'Bot')
|
|
concurrency:
|
|
group: issue-triage-${{ github.event.issue.number }}
|
|
cancel-in-progress: true
|
|
permissions:
|
|
contents: read
|
|
issues: write
|
|
id-token: write
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Run Claude Code for Issue Triage
|
|
timeout-minutes: 5
|
|
uses: anthropics/claude-code-action@v1
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
allowed_non_write_users: "*"
|
|
prompt: "/triage-issue REPO: ${{ github.repository }} ISSUE_NUMBER: ${{ github.event.issue.number }} EVENT: ${{ github.event_name }}"
|
|
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
|
claude_args: |
|
|
--model claude-opus-4-6
|