From aa6a0649bc386850ca92a03a7b2af0712f8367e6 Mon Sep 17 00:00:00 2001 From: Will Chen Date: Tue, 30 Sep 2025 22:41:02 -0700 Subject: [PATCH] Triage bot (#1417) > [!NOTE] > Adds an issue triage workflow and upgrades the duplicate-detection workflow to a newer Anthropic model. > > - **CI Workflows**: > - **New `triage-issues.yml`**: > - Runs on new issues; installs `opencode` and labels non-English (`issue/lang`) and incomplete (`issue/incomplete`) reports, posting guidance comments. > - **`duplicate-issues.yml`**: > - Updates `opencode` model to `anthropic/claude-sonnet-4-5-20250929` for duplicate detection. > > Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 11a89c6cfec1691c68837d599b8e3fc6888df09e. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot). --- .github/workflows/duplicate-issues.yml | 2 +- .github/workflows/triage-issues.yml | 68 ++++++++++++++++++++++++++ 2 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/triage-issues.yml diff --git a/.github/workflows/duplicate-issues.yml b/.github/workflows/duplicate-issues.yml index 686e76c..a526739 100644 --- a/.github/workflows/duplicate-issues.yml +++ b/.github/workflows/duplicate-issues.yml @@ -37,7 +37,7 @@ jobs: "webfetch": "deny" } run: | - opencode run -m anthropic/claude-sonnet-4-20250514 "A new issue has been created:' + opencode run -m anthropic/claude-sonnet-4-5-20250929 "A new issue has been created:' Issue number: ${{ github.event.issue.number }} diff --git a/.github/workflows/triage-issues.yml b/.github/workflows/triage-issues.yml new file mode 100644 index 0000000..631fd8d --- /dev/null +++ b/.github/workflows/triage-issues.yml @@ -0,0 +1,68 @@ +# This was copied from https://github.com/sst/opencode/blob/d7a9f343c53d481802c134ce25691a8c150d59d2/.github/workflows/duplicate-issues.yml +# MIT License +# Copyright (c) 2025 opencode + +name: Triage Issue + +on: + issues: + types: [opened] + +jobs: + triage-issues: + environment: ai-bots + runs-on: ubuntu-latest + permissions: + contents: read + issues: write + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - name: Install opencode + run: curl -fsSL https://opencode.ai/install | bash + + - name: Triage issue + env: + ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + OPENCODE_PERMISSION: | + { + "bash": { + "gh issue*": "allow", + "*": "deny" + }, + "webfetch": "deny" + } + run: | + opencode run -m anthropic/claude-sonnet-4-5-20250929 "A new issue has been created:' + + Issue number: + ${{ github.event.issue.number }} + + If most of the issue description is written in a language other than English, label the issue with 'issue/lang' and leave a friendly comment: 'Hi! We're only able to respond to issues in English. Please translate your issue with ChatGPT so we can help you. Thanks!' + + If the issue has several blank sections, then label the issue with 'issue/incomplete' and leave a friendly comment: 'Hi! Please fill in all the fields in the issue so we can help you. A screenshot is very helpful!' + + Here's an example of an empty issue: + + + + ## Bug Description (required) + + + ## Steps to Reproduce (required) + + + ## Expected Behavior (required) + + + ## Actual Behavior (required) + + + "