From 3d5ae36896279ab7fd55d40e1288d0ecce5bdc3f Mon Sep 17 00:00:00 2001 From: Robert Boyce Date: Thu, 5 Jun 2025 10:59:44 -0700 Subject: [PATCH] Add manual issue triage workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add optional issue_number parameter to Claude Issue Triage Action - Create manual workflow that accepts comma-separated issue numbers - Maintains backward compatibility with existing issue event workflow 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .../claude-issue-triage-action/action.yml | 5 +- .../workflows/claude-issue-triage-manual.yml | 46 +++++++++++++++++++ 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/claude-issue-triage-manual.yml diff --git a/.github/actions/claude-issue-triage-action/action.yml b/.github/actions/claude-issue-triage-action/action.yml index 24579672..4875db61 100644 --- a/.github/actions/claude-issue-triage-action/action.yml +++ b/.github/actions/claude-issue-triage-action/action.yml @@ -12,6 +12,9 @@ inputs: github_token: description: "GitHub token with repo and issues permissions" required: true + issue_number: + description: "Issue number to triage (optional - defaults to event issue number)" + required: false runs: using: "composite" @@ -32,7 +35,7 @@ runs: Issue Information: - REPO: ${{ github.repository }} - - ISSUE_NUMBER: ${{ github.event.issue.number }} + - ISSUE_NUMBER: ${{ inputs.issue_number || github.event.issue.number }} TASK OVERVIEW: diff --git a/.github/workflows/claude-issue-triage-manual.yml b/.github/workflows/claude-issue-triage-manual.yml new file mode 100644 index 00000000..4d8fd0e5 --- /dev/null +++ b/.github/workflows/claude-issue-triage-manual.yml @@ -0,0 +1,46 @@ +name: Claude Issue Triage Manual +description: "Manually triage GitHub issues using Claude Code" + +on: + workflow_dispatch: + inputs: + issue_numbers: + description: 'Comma-separated list of issue numbers to triage (e.g., 123,456,789)' + required: true + type: string + +jobs: + parse-issues: + runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + steps: + - name: Parse issue numbers + id: set-matrix + run: | + # Remove spaces and convert to JSON array + CLEANED=$(echo "${{ github.event.inputs.issue_numbers }}" | tr -d ' ') + IFS=',' read -ra ISSUES <<< "$CLEANED" + MATRIX_JSON=$(printf '%s\n' "${ISSUES[@]}" | jq -R . | jq -s -c '{issue: .}') + echo "matrix=$MATRIX_JSON" >> $GITHUB_OUTPUT + + triage-issue: + needs: parse-issues + runs-on: ubuntu-latest + timeout-minutes: 10 + permissions: + contents: read + issues: write + strategy: + matrix: ${{ fromJson(needs.parse-issues.outputs.matrix) }} + max-parallel: 5 + steps: + - name: Checkout repository + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + + - name: Run Claude Issue Triage + uses: ./.github/actions/claude-issue-triage-action + with: + anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} + github_token: ${{ secrets.GITHUB_TOKEN }} + issue_number: ${{ matrix.issue }} \ No newline at end of file