chore(barnacle): add false positive close label (#75014)

This commit is contained in:
Vincent Koc
2026-04-30 02:55:45 -07:00
committed by GitHub
parent 20cbc1f216
commit 9cb71f7672
2 changed files with 34 additions and 0 deletions

View File

@@ -18,6 +18,12 @@ export const rules = [
message:
"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.",
},
{
label: "r: false-positive",
close: true,
message:
"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.",
},
{
label: "r: no-ci-pr",
close: true,
@@ -64,6 +70,10 @@ export const managedLabelSpecs = {
color: "0E8A16",
description: "Auto-close: support requests belong in Discord or support docs.",
},
"r: false-positive": {
color: "D93F0B",
description: "Auto-close: false positive or reclassification-only report.",
},
"r: no-ci-pr": {
color: "D93F0B",
description: "Auto-close: PR only chasing known main CI/test failures.",

View File

@@ -192,6 +192,7 @@ describe("barnacle-auto-response", () => {
expect(managedLabelSpecs["r: skill"].description).not.toContain("Clawdhub");
expect(managedLabelSpecs.dirty.description).toContain("dirty/unrelated");
expect(managedLabelSpecs["r: support"].description).toContain("support requests");
expect(managedLabelSpecs["r: false-positive"].description).toContain("false positive");
expect(managedLabelSpecs["r: third-party-extension"].description).toContain("ClawHub");
expect(managedLabelSpecs["r: too-many-prs"].description).toContain("ten active PRs");
@@ -394,6 +395,29 @@ describe("barnacle-auto-response", () => {
expect(calls.update).toEqual([]);
});
it("closes issues tagged as false positives", async () => {
const { calls, github } = barnacleGithub([]);
await runBarnacleAutoResponse({
github,
context: barnacleIssueContext({}, ["r: false-positive"], {
action: "labeled",
label: { name: "r: false-positive" },
sender: { login: "maintainer", type: "User" },
}),
core: {
info: () => undefined,
},
});
expect(calls.createComment).toContainEqual(
expect.objectContaining({
body: expect.stringContaining("false positive"),
}),
);
expect(calls.update).toContainEqual(expect.objectContaining({ state: "closed" }));
});
it("does not respond to maintainer comments on contributor items", async () => {
const { calls, github } = barnacleGithub([], { maintainerLogins: ["maintainer"] });