From bc03ee782a28108b70fb44ddcbd468602195cb43 Mon Sep 17 00:00:00 2001 From: josh Date: Mon, 9 Feb 2026 09:27:24 +0000 Subject: [PATCH 1/2] feat: add users config for feedback commands --- .github/scripts/validate.ts | 1 + .github/tigent.yml | 5 +++++ app/api/webhook/feedback.ts | 7 +++---- app/api/webhook/triage.ts | 2 ++ app/docs/config/page.tsx | 29 +++++++++++++++++++++++++++-- app/docs/feedback/page.tsx | 5 +++-- 6 files changed, 41 insertions(+), 8 deletions(-) diff --git a/.github/scripts/validate.ts b/.github/scripts/validate.ts index a05e367..37bf8e4 100644 --- a/.github/scripts/validate.ts +++ b/.github/scripts/validate.ts @@ -6,6 +6,7 @@ const schema = z.object({ confidence: z.number().min(0).max(1).optional(), model: z.string().optional(), prompt: z.string().optional(), + users: z.array(z.string()).optional(), }); const configpath = '.github/tigent.yml'; diff --git a/.github/tigent.yml b/.github/tigent.yml index f0857e3..339a298 100644 --- a/.github/tigent.yml +++ b/.github/tigent.yml @@ -1,5 +1,10 @@ confidence: 0.6 +users: + - gr2m + - dancer + - aayuush-kapoor + prompt: | this bot labels issues and prs for the vercel ai sdk monorepo. the ai sdk provides a unified api for working with large language models across providers. diff --git a/app/api/webhook/feedback.ts b/app/api/webhook/feedback.ts index b8df259..021f695 100644 --- a/app/api/webhook/feedback.ts +++ b/app/api/webhook/feedback.ts @@ -2,14 +2,13 @@ import type { Gh, Config } from './triage'; import { classify, fetchlabels, addlabels } from './triage'; import { createpr } from './learn'; -const allowed = ['OWNER', 'MEMBER', 'COLLABORATOR']; - export async function handlecomment(gh: Gh, config: Config, payload: any) { const comment = payload.comment; const body: string = comment.body?.trim() || ''; - const association: string = comment.author_association || ''; + const username: string = comment.user?.login || ''; - if (!allowed.includes(association)) return; + if (!config.users.some(u => u.toLowerCase() === username.toLowerCase())) + return; if (!body.toLowerCase().startsWith('@tigent')) return; const command = body.slice(7).trim().toLowerCase(); diff --git a/app/api/webhook/triage.ts b/app/api/webhook/triage.ts index 31dd117..2a43604 100644 --- a/app/api/webhook/triage.ts +++ b/app/api/webhook/triage.ts @@ -13,6 +13,7 @@ export interface Config { confidence: number; model: string; prompt: string; + users: string[]; } export interface Label { @@ -24,6 +25,7 @@ export const defaultconfig: Config = { confidence: 0.6, model: 'openai/gpt-5-nano', prompt: '', + users: [], }; export async function getconfig(gh: Gh): Promise { diff --git a/app/docs/config/page.tsx b/app/docs/config/page.tsx index 9251190..9c3b6a8 100644 --- a/app/docs/config/page.tsx +++ b/app/docs/config/page.tsx @@ -94,14 +94,39 @@ export default function Config() { +
+
+
+

+ users +

+

+ List of GitHub usernames allowed to use feedback commands (@tigent + why, @tigent wrong). Only users in this list can interact with + Tigent. If no users are configured, feedback commands are + disabled. +

+ {`users: + - gr2m + - aayuush-kapoor + - dancer`} +
+
+
+

A complete config file:

{`confidence: 0.7 +users: + - gr2m + - aayuush-kapoor + prompt: | crashes and errors are always bug. - if the issue describes data loss or a crash, assign p0. - minor bugs get p1. feature requests get feature, not enhancement.`}
diff --git a/app/docs/feedback/page.tsx b/app/docs/feedback/page.tsx index d9c23ba..c881d10 100644 --- a/app/docs/feedback/page.tsx +++ b/app/docs/feedback/page.tsx @@ -70,8 +70,9 @@ prompt: |

- Only users with OWNER, MEMBER, or COLLABORATOR association can use - feedback commands. Comments from other users are ignored. + Only users listed in the users config can use feedback commands. + Comments from other users are ignored. If no users are configured, + feedback commands are disabled.

From 585afe3a7f921593efe6eac2b4a1ee9c33f32368 Mon Sep 17 00:00:00 2001 From: josh Date: Mon, 9 Feb 2026 09:27:48 +0000 Subject: [PATCH 2/2] feat: add nico, lars, and felix to users list --- .github/tigent.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/tigent.yml b/.github/tigent.yml index 339a298..9602696 100644 --- a/.github/tigent.yml +++ b/.github/tigent.yml @@ -3,7 +3,10 @@ confidence: 0.6 users: - gr2m - dancer - - aayuush-kapoor + - aayush-kapoor + - lgrammel + - nicoalbanese + - felixarntz prompt: | this bot labels issues and prs for the vercel ai sdk monorepo. the ai sdk provides a unified api for working with large language models across providers.