From cfe59860888d9eccb1f41858809c33c20e286a56 Mon Sep 17 00:00:00 2001 From: s1gr1d <32902192+s1gr1d@users.noreply.github.com> Date: Tue, 17 Feb 2026 14:25:35 +0100 Subject: [PATCH 1/7] chore(github): Add triage issue workflow --- .github/workflows/triage-issue.yml | 59 ++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 .github/workflows/triage-issue.yml diff --git a/.github/workflows/triage-issue.yml b/.github/workflows/triage-issue.yml new file mode 100644 index 000000000000..735d0749f43e --- /dev/null +++ b/.github/workflows/triage-issue.yml @@ -0,0 +1,59 @@ +name: Triage Issue + +on: + issues: + types: [opened] + workflow_dispatch: + inputs: + issue_number: + description: 'Issue number or URL (e.g., 1234 or https://github.com/getsentry/sentry-javascript/issues/1234)' + required: true + type: string + +# Per-issue concurrency to prevent duplicate analysis +concurrency: + group: triage-issue-${{ github.event.issue.number || github.event.inputs.issue_number }} + cancel-in-progress: false + +jobs: + triage-issue: + runs-on: ubuntu-latest + permissions: + contents: read + issues: write + pull-requests: write + # Only run for Bug or Feature issues (automatic mode) + if: | + github.event_name == 'workflow_dispatch' || + contains(github.event.issue.labels.*.name, 'Bug') || + contains(github.event.issue.labels.*.name, 'Feature') + + steps: + - name: Parse issue number + id: parse-issue + run: | + if [ "${{ github.event_name }}" = "issues" ]; then + ISSUE_NUM="${{ github.event.issue.number }}" + else + # Extract number from input (supports both "1234" and full URLs) + INPUT="${{ github.event.inputs.issue_number }}" + ISSUE_NUM=$(echo "$INPUT" | grep -oE '[0-9]+$') + fi + + echo "issue_number=$ISSUE_NUM" >> "$GITHUB_OUTPUT" + echo "Processing issue #$ISSUE_NUM in CI mode" + + - name: Checkout repository + uses: actions/checkout@v4 + with: + ref: develop + + - name: Run Claude triage + uses: anthropics/claude-code-action@v1 + env: + LINEAR_API_KEY: ${{ secrets.LINEAR_API_KEY }} + with: + anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} + prompt: | + /triage-issue ${{ steps.parse-issue.outputs.issue_number }} --mode CI + claude_args: '--max-turns 20' From 4ffeacb273636252ae8df600a44342b9b14dfca4 Mon Sep 17 00:00:00 2001 From: s1gr1d <32902192+s1gr1d@users.noreply.github.com> Date: Tue, 17 Feb 2026 15:22:45 +0100 Subject: [PATCH 2/7] only allow numbers --- .github/workflows/triage-issue.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/triage-issue.yml b/.github/workflows/triage-issue.yml index 735d0749f43e..e725dc0cd9cb 100644 --- a/.github/workflows/triage-issue.yml +++ b/.github/workflows/triage-issue.yml @@ -6,9 +6,9 @@ on: workflow_dispatch: inputs: issue_number: - description: 'Issue number or URL (e.g., 1234 or https://github.com/getsentry/sentry-javascript/issues/1234)' + description: 'Issue number (e.g., 1234)' required: true - type: string + type: number # Per-issue concurrency to prevent duplicate analysis concurrency: @@ -31,13 +31,15 @@ jobs: steps: - name: Parse issue number id: parse-issue + env: + EVENT_NAME: ${{ github.event_name }} + EVENT_ISSUE_NUMBER: ${{ github.event.issue.number }} + INPUT_ISSUE_NUMBER: ${{ github.event.inputs.issue_number }} run: | - if [ "${{ github.event_name }}" = "issues" ]; then - ISSUE_NUM="${{ github.event.issue.number }}" + if [ "$EVENT_NAME" = "issues" ]; then + ISSUE_NUM="$EVENT_ISSUE_NUMBER" else - # Extract number from input (supports both "1234" and full URLs) - INPUT="${{ github.event.inputs.issue_number }}" - ISSUE_NUM=$(echo "$INPUT" | grep -oE '[0-9]+$') + ISSUE_NUM="$INPUT_ISSUE_NUMBER" fi echo "issue_number=$ISSUE_NUM" >> "$GITHUB_OUTPUT" From cd54092fe933f8ddb5f700059f85bde7f0fb174c Mon Sep 17 00:00:00 2001 From: s1gr1d <32902192+s1gr1d@users.noreply.github.com> Date: Tue, 17 Feb 2026 17:13:48 +0100 Subject: [PATCH 3/7] only manual trigger --- .github/workflows/triage-issue.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/triage-issue.yml b/.github/workflows/triage-issue.yml index e725dc0cd9cb..bd22b9ac4efa 100644 --- a/.github/workflows/triage-issue.yml +++ b/.github/workflows/triage-issue.yml @@ -1,8 +1,9 @@ name: Triage Issue on: - issues: - types: [opened] + # Only trigger this workflow manually for now + # issues: + # types: [opened] workflow_dispatch: inputs: issue_number: @@ -24,10 +25,10 @@ jobs: pull-requests: write # Only run for Bug or Feature issues (automatic mode) if: | - github.event_name == 'workflow_dispatch' || - contains(github.event.issue.labels.*.name, 'Bug') || + github.event_name == 'workflow_dispatch' || + contains(github.event.issue.labels.*.name, 'Bug') || contains(github.event.issue.labels.*.name, 'Feature') - + steps: - name: Parse issue number id: parse-issue @@ -41,7 +42,7 @@ jobs: else ISSUE_NUM="$INPUT_ISSUE_NUMBER" fi - + echo "issue_number=$ISSUE_NUM" >> "$GITHUB_OUTPUT" echo "Processing issue #$ISSUE_NUM in CI mode" From f7c9ff2c5f2634a5bf5ebb0de56675ac099d3294 Mon Sep 17 00:00:00 2001 From: s1gr1d <32902192+s1gr1d@users.noreply.github.com> Date: Wed, 18 Feb 2026 10:06:41 +0100 Subject: [PATCH 4/7] change permissions to read; add env --- .github/workflows/triage-issue.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/triage-issue.yml b/.github/workflows/triage-issue.yml index bd22b9ac4efa..a98a0ebd1b5b 100644 --- a/.github/workflows/triage-issue.yml +++ b/.github/workflows/triage-issue.yml @@ -21,8 +21,8 @@ jobs: runs-on: ubuntu-latest permissions: contents: read - issues: write - pull-requests: write + issues: read + pull-requests: read # Only run for Bug or Feature issues (automatic mode) if: | github.event_name == 'workflow_dispatch' || @@ -53,10 +53,15 @@ jobs: - name: Run Claude triage uses: anthropics/claude-code-action@v1 - env: - LINEAR_API_KEY: ${{ secrets.LINEAR_API_KEY }} with: anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} + settings: | + { + "env": { + "LINEAR_CLIENT_ID": ${{ secrets.LINEAR_CLIENT_ID }}, + "LINEAR_CLIENT_SECRET":${{ secrets.LINEAR_CLIENT_SECRET }} + } + } prompt: | /triage-issue ${{ steps.parse-issue.outputs.issue_number }} --mode CI claude_args: '--max-turns 20' From 352b551449e3e6631deef7d12920c421be8ec9eb Mon Sep 17 00:00:00 2001 From: s1gr1d <32902192+s1gr1d@users.noreply.github.com> Date: Wed, 18 Feb 2026 10:14:00 +0100 Subject: [PATCH 5/7] format --- .github/workflows/triage-issue.yml | 2 +- .../test-applications/astro-5-cf-workers/wrangler.jsonc | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/triage-issue.yml b/.github/workflows/triage-issue.yml index a98a0ebd1b5b..d17902d27b4c 100644 --- a/.github/workflows/triage-issue.yml +++ b/.github/workflows/triage-issue.yml @@ -3,7 +3,7 @@ name: Triage Issue on: # Only trigger this workflow manually for now # issues: - # types: [opened] + # types: [opened] workflow_dispatch: inputs: issue_number: diff --git a/dev-packages/e2e-tests/test-applications/astro-5-cf-workers/wrangler.jsonc b/dev-packages/e2e-tests/test-applications/astro-5-cf-workers/wrangler.jsonc index 5ef4f1ff11f6..0b7b36047973 100644 --- a/dev-packages/e2e-tests/test-applications/astro-5-cf-workers/wrangler.jsonc +++ b/dev-packages/e2e-tests/test-applications/astro-5-cf-workers/wrangler.jsonc @@ -8,11 +8,10 @@ "SENTRY_DSN": "https://username@domain/123", "SENTRY_ENVIRONMENT": "qa", "SENTRY_TRACES_SAMPLE_RATE": "1.0", - "SENTRY_TUNNEL": "http://localhost:3031/" + "SENTRY_TUNNEL": "http://localhost:3031/", }, "assets": { "binding": "ASSETS", - "directory": "./dist" - } + "directory": "./dist", + }, } - From 5dc0dc7894983be22dc9ceba204f830b69f6aedc Mon Sep 17 00:00:00 2001 From: s1gr1d <32902192+s1gr1d@users.noreply.github.com> Date: Wed, 18 Feb 2026 10:19:58 +0100 Subject: [PATCH 6/7] fix prompt --- .github/workflows/triage-issue.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/triage-issue.yml b/.github/workflows/triage-issue.yml index d17902d27b4c..1a6e45ff8e66 100644 --- a/.github/workflows/triage-issue.yml +++ b/.github/workflows/triage-issue.yml @@ -63,5 +63,6 @@ jobs: } } prompt: | - /triage-issue ${{ steps.parse-issue.outputs.issue_number }} --mode CI + /triage-issue ${{ steps.parse-issue.outputs.issue_number }} --ci + IMPORTANT: Do NOT dismiss any alerts. Do NOT wait for approval. claude_args: '--max-turns 20' From 19eb6a1ad24b65ad884c3939f349f4d9d3e7e39d Mon Sep 17 00:00:00 2001 From: s1gr1d <32902192+s1gr1d@users.noreply.github.com> Date: Wed, 18 Feb 2026 10:37:23 +0100 Subject: [PATCH 7/7] add "" --- .github/workflows/triage-issue.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/triage-issue.yml b/.github/workflows/triage-issue.yml index 1a6e45ff8e66..924673fbe961 100644 --- a/.github/workflows/triage-issue.yml +++ b/.github/workflows/triage-issue.yml @@ -58,8 +58,8 @@ jobs: settings: | { "env": { - "LINEAR_CLIENT_ID": ${{ secrets.LINEAR_CLIENT_ID }}, - "LINEAR_CLIENT_SECRET":${{ secrets.LINEAR_CLIENT_SECRET }} + "LINEAR_CLIENT_ID": "${{ secrets.LINEAR_CLIENT_ID }}", + "LINEAR_CLIENT_SECRET": "${{ secrets.LINEAR_CLIENT_SECRET }}" } } prompt: |