Skip to content

Commit 9cb71f7

Browse files
authored
chore(barnacle): add false positive close label (#75014)
1 parent 20cbc1f commit 9cb71f7

2 files changed

Lines changed: 34 additions & 0 deletions

File tree

scripts/github/barnacle-auto-response.mjs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ export const rules = [
1818
message:
1919
"Please use [our support server](https://discord.gg/clawd) and ask in #help or #users-helping-users to resolve this, or follow the stuck FAQ at https://docs.openclaw.ai/help/faq#im-stuck-whats-the-fastest-way-to-get-unstuck.",
2020
},
21+
{
22+
label: "r: false-positive",
23+
close: true,
24+
message:
25+
"Closing this because it looks like a false positive or reclassification-only report rather than an actionable OpenClaw bug. If this is still a real issue, please open a fresh report with concrete reproduction steps and current-version details.",
26+
},
2127
{
2228
label: "r: no-ci-pr",
2329
close: true,
@@ -64,6 +70,10 @@ export const managedLabelSpecs = {
6470
color: "0E8A16",
6571
description: "Auto-close: support requests belong in Discord or support docs.",
6672
},
73+
"r: false-positive": {
74+
color: "D93F0B",
75+
description: "Auto-close: false positive or reclassification-only report.",
76+
},
6777
"r: no-ci-pr": {
6878
color: "D93F0B",
6979
description: "Auto-close: PR only chasing known main CI/test failures.",

test/scripts/barnacle-auto-response.test.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ describe("barnacle-auto-response", () => {
192192
expect(managedLabelSpecs["r: skill"].description).not.toContain("Clawdhub");
193193
expect(managedLabelSpecs.dirty.description).toContain("dirty/unrelated");
194194
expect(managedLabelSpecs["r: support"].description).toContain("support requests");
195+
expect(managedLabelSpecs["r: false-positive"].description).toContain("false positive");
195196
expect(managedLabelSpecs["r: third-party-extension"].description).toContain("ClawHub");
196197
expect(managedLabelSpecs["r: too-many-prs"].description).toContain("ten active PRs");
197198

@@ -394,6 +395,29 @@ describe("barnacle-auto-response", () => {
394395
expect(calls.update).toEqual([]);
395396
});
396397

398+
it("closes issues tagged as false positives", async () => {
399+
const { calls, github } = barnacleGithub([]);
400+
401+
await runBarnacleAutoResponse({
402+
github,
403+
context: barnacleIssueContext({}, ["r: false-positive"], {
404+
action: "labeled",
405+
label: { name: "r: false-positive" },
406+
sender: { login: "maintainer", type: "User" },
407+
}),
408+
core: {
409+
info: () => undefined,
410+
},
411+
});
412+
413+
expect(calls.createComment).toContainEqual(
414+
expect.objectContaining({
415+
body: expect.stringContaining("false positive"),
416+
}),
417+
);
418+
expect(calls.update).toContainEqual(expect.objectContaining({ state: "closed" }));
419+
});
420+
397421
it("does not respond to maintainer comments on contributor items", async () => {
398422
const { calls, github } = barnacleGithub([], { maintainerLogins: ["maintainer"] });
399423

0 commit comments

Comments
 (0)