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
| 1 | name: Claude Issue Triage |
| 2 | on: |
| 3 | issues: |
| 4 | types: [opened] |
| 5 | issue_comment: |
| 6 | types: [created] |
| 7 | |
| 8 | jobs: |
| 9 | triage-issue: |
| 10 | runs-on: ubuntu-latest |
| 11 | timeout-minutes: 10 |
| 12 | if: >- |
| 13 | github.event_name == 'issues' || |
| 14 | (github.event_name == 'issue_comment' && !github.event.issue.pull_request && github.event.comment.user.type != 'Bot') |
| 15 | concurrency: |
| 16 | group: issue-triage-${{ github.event.issue.number }} |
| 17 | cancel-in-progress: true |
| 18 | permissions: |
| 19 | contents: read |
| 20 | issues: write |
| 21 | # Required to mint the OIDC token exchanged for a Claude API access token (Workload Identity Federation) |
| 22 | id-token: write |
| 23 | |
| 24 | steps: |
| 25 | - name: Checkout repository |
| 26 | uses: actions/checkout@v4 |
| 27 | |
| 28 | - name: Run Claude Code for Issue Triage |
| 29 | timeout-minutes: 5 |
| 30 | uses: anthropics/claude-code-action@v1 |
| 31 | env: |
| 32 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 33 | GH_REPO: ${{ github.repository }} |
| 34 | CLAUDE_CODE_SCRIPT_CAPS: '{"edit-issue-labels.sh":2}' |
| 35 | with: |
| 36 | github_token: ${{ secrets.GITHUB_TOKEN }} |
| 37 | allowed_non_write_users: "*" |
| 38 | prompt: "/triage-issue REPO: ${{ github.repository }} ISSUE_NUMBER: ${{ github.event.issue.number }} EVENT: ${{ github.event_name }}" |
| 39 | # Authenticate to the Claude API via Workload Identity Federation |
| 40 | # (the workflow's OIDC token is exchanged for a short-lived access |
| 41 | # token) instead of a static API key. |
| 42 | anthropic_federation_rule_id: ${{ vars.ANTHROPIC_FEDERATION_RULE_ID }} |
| 43 | anthropic_organization_id: ${{ vars.ANTHROPIC_ORGANIZATION_ID }} |
| 44 | anthropic_service_account_id: ${{ vars.ANTHROPIC_SERVICE_ACCOUNT_ID }} |
| 45 | anthropic_workspace_id: ${{ vars.ANTHROPIC_WORKSPACE_ID }} |
| 46 | claude_args: | |
| 47 | --model claude-opus-4-6 |