spacehub

surshar / claude-code

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

Built by Anthropic · github.com/anthropics

claude-code / .github / workflows / claude-issue-triage.yml
54 lines · 2.3 KBRaw
1name: Claude Issue Triage
2on:
3 issues:
4 types: [opened]
5 issue_comment:
6 types: [created]
7
8jobs:
9 triage-issue:
10 # This job calls Claude, so it runs on GitHub's egress-firewall runner, which
11 # filters the job's outbound network traffic (allow list: .github/egress-firewall.yaml).
12 runs-on: ubuntu-24.04-firewall
13 timeout-minutes: 10
14 if: >-
15 github.event_name == 'issues' ||
16 (github.event_name == 'issue_comment' && !github.event.issue.pull_request && github.event.comment.user.type != 'Bot')
17 concurrency:
18 group: issue-triage-${{ github.event.issue.number }}
19 cancel-in-progress: true
20 permissions:
21 contents: read
22 issues: write
23 # Required to mint the OIDC token exchanged for a Claude API access token (Workload Identity Federation)
24 id-token: write
25
26 steps:
27 - name: Checkout repository
28 uses: actions/checkout@v4
29
30 - name: Run Claude Code for Issue Triage
31 timeout-minutes: 5
32 uses: anthropics/claude-code-action@v1
33 env:
34 GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35 GH_REPO: ${{ github.repository }}
36 CLAUDE_CODE_SCRIPT_CAPS: '{"edit-issue-labels.sh":2}'
37 with:
38 github_token: ${{ secrets.GITHUB_TOKEN }}
39 allowed_non_write_users: "*"
40 prompt: "/triage-issue REPO: ${{ github.repository }} ISSUE_NUMBER: ${{ github.event.issue.number }} EVENT: ${{ github.event_name }}"
41 # Authenticate to the Claude API via Workload Identity Federation
42 # (the workflow's OIDC token is exchanged for a short-lived access
43 # token) instead of a static API key.
44 anthropic_federation_rule_id: ${{ vars.ANTHROPIC_FEDERATION_RULE_ID }}
45 anthropic_organization_id: ${{ vars.ANTHROPIC_ORGANIZATION_ID }}
46 anthropic_service_account_id: ${{ vars.ANTHROPIC_SERVICE_ACCOUNT_ID }}
47 anthropic_workspace_id: ${{ vars.ANTHROPIC_WORKSPACE_ID }}
48 # --permission-mode auto: a tool call that needs permission and is outside the allowed-tools
49 # list in .claude/commands/triage-issue.md runs only if Claude Code's safety review passes
50 # it. Tools in --disallowedTools never run.
51 claude_args: |
52 --permission-mode auto
53 --disallowedTools "WebFetch,WebSearch,Write,Edit,MultiEdit,NotebookEdit"
54 --model claude-opus-4-6