From bfb254dac6f8a3ea217f5393a33d87c030b12b6d Mon Sep 17 00:00:00 2001 From: Aiden Cline Date: Mon, 15 Dec 2025 19:15:40 -0600 Subject: ci: auto triage issues --- .opencode/tool/github-triage.ts | 51 ++++++++++++++++++++++++++ .opencode/tool/github-triage.txt | 79 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 130 insertions(+) create mode 100644 .opencode/tool/github-triage.ts create mode 100644 .opencode/tool/github-triage.txt (limited to '.opencode/tool') diff --git a/.opencode/tool/github-triage.ts b/.opencode/tool/github-triage.ts new file mode 100644 index 000000000..f0437e623 --- /dev/null +++ b/.opencode/tool/github-triage.ts @@ -0,0 +1,51 @@ +import { Octokit } from "@octokit/rest" +import { tool } from "@opencode-ai/plugin" +import DESCRIPTION from "./github-triage.txt" + +function getIssueNumber(): number { + const issue = parseInt(process.env.ISSUE_NUMBER ?? "", 10) + if (!issue) throw new Error("ISSUE_NUMBER env var not set") + return issue +} + +export default tool({ + description: DESCRIPTION, + args: { + assignee: tool.schema + .enum(["thdxr", "adamdotdevin", "rekram1-node", "fwang", "jayair", "kommander"]) + .describe("The username of the assignee") + .default("rekram1-node"), + labels: tool.schema + .array(tool.schema.enum(["nix", "opentui", "perf", "web", "zen", "docs"])) + .describe("The labels(s) to add to the issue") + .optional(), + }, + async execute(args) { + const issue = getIssueNumber() + const octokit = new Octokit({ auth: process.env.GITHUB_TOKEN }) + const owner = "sst" + const repo = "opencode" + + const results: string[] = [] + + await octokit.rest.issues.addAssignees({ + owner, + repo, + issue_number: issue, + assignees: [args.assignee], + }) + results.push(`Assigned @${args.assignee} to issue #${issue}`) + + if (args.labels && args.labels.length > 0) { + await octokit.rest.issues.addLabels({ + owner, + repo, + issue_number: issue, + labels: args.labels, + }) + results.push(`Added labels: ${args.labels.join(", ")}`) + } + + return results.join("\n") + }, +}) diff --git a/.opencode/tool/github-triage.txt b/.opencode/tool/github-triage.txt new file mode 100644 index 000000000..78b78a7ce --- /dev/null +++ b/.opencode/tool/github-triage.txt @@ -0,0 +1,79 @@ +Use this tool to assign and/or label a Github issue. + +You can assign the following users: +- thdxr +- adamdotdevin +- fwang +- jayair +- kommander +- rekram1-node + + +You can use the following labels: +- nix +- opentui +- perf +- web +- zen +- docs + +Always try to assign an issue, if in doubt, assign rekram1-node to it. + +## Breakdown of responsibilities: + +### thdxr + +Dax is responsible for managing core parts of the application, for large feature requests, api changes, or things that require significant changes to the codebase assign him. + +This relates to OpenCode server primarily but has overlap with just about anything + +### adamdotdevin + +Adam is responsible for managing the Desktop/Web app. If there is an issue relating to the desktop app or `opencode web` command. Assign him. + +### fwang + +Frank is responsible for managing Zen, if you see complaints about OpenCode Zen, maybe it's the dashboard, the model quality, billing issues, etc. Assign him to the issue. + +### jayair + +Jay is responsible for documentation. If there is an issue relating to documentation assign him. + +### kommander + +Sebastian is responsible for managing an OpenTUI (a library for building terminal user interfaces). OpenCode's TUI is built with OpenTUI. If there are issues abou: +- random characters on screen +- keybinds not working on different terminals +- general terminal stuff +Then assign the issue to Him. + +### rekram1-node + +Assign Aiden to an issue as a catch all, if you can't assign anyone else. Most of the time this will be bugs/polish things. +If no one else makes sense to assign, assign rekram1-node to it. + +## Breakdown of Labels: + +### nix + +Any issue that mentions nix, or nixos should have a nix label + +### opentui + +Anything relating to the TUI itself should have an opentui label + +### perf + +Anything related to slow performance, high ram, high cpu usage, or any other performance related issue should have a perf label + +### web + +Anything related to `opencode web` or the desktop app should have a web label + +### zen + +Anything related to OpenCode Zen, billing, or model quality from Zen should have a zen label + +### docs + +Anything related to the documentation should have a docs label -- cgit v1.2.3 From d7b5b431d67a9ab2183082ce8621cf7bfbcf444b Mon Sep 17 00:00:00 2001 From: Aiden Cline <63023139+rekram1-node@users.noreply.github.com> Date: Mon, 15 Dec 2025 22:11:30 -0600 Subject: ci: Update issue assignment and labeling guidelines Clarified assignment responsibilities and labeling for issues related to OpenCode tools. --- .opencode/tool/github-triage.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to '.opencode/tool') diff --git a/.opencode/tool/github-triage.txt b/.opencode/tool/github-triage.txt index 78b78a7ce..0c1473a93 100644 --- a/.opencode/tool/github-triage.txt +++ b/.opencode/tool/github-triage.txt @@ -31,6 +31,7 @@ This relates to OpenCode server primarily but has overlap with just about anythi Adam is responsible for managing the Desktop/Web app. If there is an issue relating to the desktop app or `opencode web` command. Assign him. + ### fwang Frank is responsible for managing Zen, if you see complaints about OpenCode Zen, maybe it's the dashboard, the model quality, billing issues, etc. Assign him to the issue. @@ -47,6 +48,8 @@ Sebastian is responsible for managing an OpenTUI (a library for building termina - general terminal stuff Then assign the issue to Him. +(anything that should have opentui label basically) + ### rekram1-node Assign Aiden to an issue as a catch all, if you can't assign anyone else. Most of the time this will be bugs/polish things. @@ -68,7 +71,7 @@ Anything related to slow performance, high ram, high cpu usage, or any other per ### web -Anything related to `opencode web` or the desktop app should have a web label +Anything related to `opencode web` or the desktop app should have a web label. Never add this label for anything terminal/tui related ### zen -- cgit v1.2.3 From ae3990a55756912ef815767673d1e040623a77bc Mon Sep 17 00:00:00 2001 From: Aiden Cline Date: Mon, 15 Dec 2025 23:07:55 -0600 Subject: chore: centralize dep to catalog & fix typos --- .github/workflows/triage.yml | 6 ++++-- .opencode/bun.lock | 6 +++--- .opencode/package.json | 2 +- .opencode/tool/github-triage.txt | 4 +--- bun.lock | 5 +++-- github/package.json | 2 +- package.json | 1 + packages/function/package.json | 2 +- packages/opencode/package.json | 2 +- 9 files changed, 16 insertions(+), 14 deletions(-) (limited to '.opencode/tool') diff --git a/.github/workflows/triage.yml b/.github/workflows/triage.yml index 2900137f0..9cc76973d 100644 --- a/.github/workflows/triage.yml +++ b/.github/workflows/triage.yml @@ -24,9 +24,11 @@ jobs: OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ISSUE_NUMBER: ${{ github.event.issue.number }} + ISSUE_TITLE: ${{ github.event.issue.title }} + ISSUE_BODY: ${{ github.event.issue.body }} run: | opencode run --agent triage "The following issue was just opened, triage it: - Title: ${{ github.event.issue.title }} + Title: $ISSUE_TITLE - ${{ github.event.issue.body }}" + $ISSUE_BODY" diff --git a/.opencode/bun.lock b/.opencode/bun.lock index cbc88dbe6..6b926ef90 100644 --- a/.opencode/bun.lock +++ b/.opencode/bun.lock @@ -5,7 +5,7 @@ "": { "dependencies": { "@octokit/rest": "^22.0.1", - "@opencode-ai/plugin": "0.0.0-dev-202512160036", + "@opencode-ai/plugin": "0.0.0-dev-202512160412", }, }, }, @@ -34,9 +34,9 @@ "@octokit/types": ["@octokit/types@16.0.0", "", { "dependencies": { "@octokit/openapi-types": "^27.0.0" } }, "sha512-sKq+9r1Mm4efXW1FCk7hFSeJo4QKreL/tTbR0rz/qx/r1Oa2VV83LTA/H/MuCOX7uCIJmQVRKBcbmWoySjAnSg=="], - "@opencode-ai/plugin": ["@opencode-ai/plugin@0.0.0-dev-202512160036", "", { "dependencies": { "@opencode-ai/sdk": "0.0.0-dev-202512160036", "zod": "4.1.8" } }, "sha512-6FVQIsC4myRGtH5b80BG2122EDFNDh0TaLfiSl5frssEPGfR/Sny54ZUB0dy9tbqYD8sVA34z2lb34dsyyFfmg=="], + "@opencode-ai/plugin": ["@opencode-ai/plugin@0.0.0-dev-202512160412", "", { "dependencies": { "@opencode-ai/sdk": "0.0.0-dev-202512160412", "zod": "4.1.8" } }, "sha512-/SGOQeHtRqg89KcAO7iF5b7CTDpCxbMtzXU0BbFzrhF7r7RE+8VCUoHrFKJyS0x6kkDodBajjKIL61yECKW9Ng=="], - "@opencode-ai/sdk": ["@opencode-ai/sdk@0.0.0-dev-202512160036", "", {}, "sha512-OHQjEZcBLUPIIxtb2RyTRedTw8FaiQwTRopAzOPocHLDiij9E5rco99LflYX8OuBMJQaH/1YTilVs6ZErTsuIQ=="], + "@opencode-ai/sdk": ["@opencode-ai/sdk@0.0.0-dev-202512160412", "", {}, "sha512-NWjoJmxiS/WPU+HR2C6+08EoCwhqjLgGQeEK+oDAZL2TL5OnETyAMG0zlGYxtwqQpRrr9t3rW0MWzC+VYpygFw=="], "before-after-hook": ["before-after-hook@4.0.0", "", {}, "sha512-q6tR3RPqIB1pMiTRMFcZwuG5T8vwp+vUvEG0vuI6B+Rikh5BfPp2fQ82c925FOs+b0lcFQ8CFrL+KbilfZFhOQ=="], diff --git a/.opencode/package.json b/.opencode/package.json index d98a0245d..662ee6b16 100644 --- a/.opencode/package.json +++ b/.opencode/package.json @@ -1,6 +1,6 @@ { "dependencies": { "@octokit/rest": "^22.0.1", - "@opencode-ai/plugin": "0.0.0-dev-202512160036" + "@opencode-ai/plugin": "0.0.0-dev-202512160412" } } diff --git a/.opencode/tool/github-triage.txt b/.opencode/tool/github-triage.txt index 0c1473a93..14844a19f 100644 --- a/.opencode/tool/github-triage.txt +++ b/.opencode/tool/github-triage.txt @@ -42,14 +42,12 @@ Jay is responsible for documentation. If there is an issue relating to documenta ### kommander -Sebastian is responsible for managing an OpenTUI (a library for building terminal user interfaces). OpenCode's TUI is built with OpenTUI. If there are issues abou: +Sebastian is responsible for managing an OpenTUI (a library for building terminal user interfaces). OpenCode's TUI is built with OpenTUI. If there are issues about: - random characters on screen - keybinds not working on different terminals - general terminal stuff Then assign the issue to Him. -(anything that should have opentui label basically) - ### rekram1-node Assign Aiden to an issue as a catch all, if you can't assign anyone else. Most of the time this will be bugs/polish things. diff --git a/bun.lock b/bun.lock index 3c48017fc..90450d399 100644 --- a/bun.lock +++ b/bun.lock @@ -202,7 +202,7 @@ "version": "1.0.162", "dependencies": { "@octokit/auth-app": "8.0.1", - "@octokit/rest": "22.0.0", + "@octokit/rest": "catalog:", "hono": "catalog:", "jose": "6.0.11", }, @@ -238,7 +238,7 @@ "@hono/zod-validator": "catalog:", "@modelcontextprotocol/sdk": "1.15.1", "@octokit/graphql": "9.0.2", - "@octokit/rest": "22.0.0", + "@octokit/rest": "catalog:", "@openauthjs/openauth": "catalog:", "@opencode-ai/plugin": "workspace:*", "@opencode-ai/script": "workspace:*", @@ -470,6 +470,7 @@ "@cloudflare/workers-types": "4.20251008.0", "@hono/zod-validator": "0.4.2", "@kobalte/core": "0.13.11", + "@octokit/rest": "22.0.0", "@openauthjs/openauth": "0.0.0-20250322224806", "@pierre/diffs": "1.0.0-beta.3", "@solidjs/meta": "0.29.4", diff --git a/github/package.json b/github/package.json index 1a6598d6b..4d447716f 100644 --- a/github/package.json +++ b/github/package.json @@ -13,7 +13,7 @@ "@actions/core": "1.11.1", "@actions/github": "6.0.1", "@octokit/graphql": "9.0.1", - "@octokit/rest": "22.0.0", + "@octokit/rest": "catalog:", "@opencode-ai/sdk": "workspace:*" } } diff --git a/package.json b/package.json index 65ecdfdb5..2be8bfe76 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ ], "catalog": { "@types/bun": "1.3.4", + "@octokit/rest": "22.0.0", "@hono/zod-validator": "0.4.2", "ulid": "3.0.1", "@kobalte/core": "0.13.11", diff --git a/packages/function/package.json b/packages/function/package.json index 6e02eb9ea..f1c3cf78a 100644 --- a/packages/function/package.json +++ b/packages/function/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@octokit/auth-app": "8.0.1", - "@octokit/rest": "22.0.0", + "@octokit/rest": "catalog:", "hono": "catalog:", "jose": "6.0.11" } diff --git a/packages/opencode/package.json b/packages/opencode/package.json index cc5e45db8..a3798c4ba 100644 --- a/packages/opencode/package.json +++ b/packages/opencode/package.json @@ -64,7 +64,7 @@ "@hono/zod-validator": "catalog:", "@modelcontextprotocol/sdk": "1.15.1", "@octokit/graphql": "9.0.2", - "@octokit/rest": "22.0.0", + "@octokit/rest": "catalog:", "@openauthjs/openauth": "catalog:", "@opencode-ai/plugin": "workspace:*", "@opencode-ai/script": "workspace:*", -- cgit v1.2.3