Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go

fix(autopilots): use valid bug triage status (MUL-6092) (#6880)

Jamison-J6e147b0cf89c
diff --git a/packages/views/autopilots/components/autopilots-page.test.ts b/packages/views/autopilots/components/autopilots-page.test.ts
new file mode 100644
index 0000000000..c6412130ee
--- /dev/null
+++ b/packages/views/autopilots/components/autopilots-page.test.ts
@@ -0,0 +1,19 @@
+import { readFileSync } from "node:fs";
+import { describe, expect, it } from "vitest";
+
+const pageSource = readFileSync(
+ "autopilots/components/autopilots-page.tsx",
+ "utf8",
+);
+
+describe("built-in Autopilot templates", () => {
+ it("queries only backlog issues in the bug triage template", () => {
+ const prompt = pageSource.match(/id: "bug_triage",\s*prompt: `([^`]*)`/s)?.[1];
+
+ expect(prompt).toBeDefined();
+ expect(prompt?.split("\n", 1)[0]?.trimEnd()).toBe(
+ "1. List all backlog issues that have not been prioritized",
+ );
+ expect(prompt).not.toContain('status "triage"');
+ });
+});
diff --git a/packages/views/autopilots/components/autopilots-page.tsx b/packages/views/autopilots/components/autopilots-page.tsx
index c97598a014..095a7eff1c 100644
--- a/packages/views/autopilots/components/autopilots-page.tsx
+++ b/packages/views/autopilots/components/autopilots-page.tsx
@@ -165,7 +165,7 @@ const TEMPLATES: AutopilotTemplate[] = [
},
{
id: "bug_triage",
- prompt: `1. List all issues with status "triage" or "backlog" that have not been prioritized
+ prompt: `1. List all backlog issues that have not been prioritized
2. For each issue, read the description and any attached logs or screenshots
3. Assess severity (critical / high / medium / low) based on user impact and scope
4. Set the priority field on the issue accordingly