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

@@ -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"] });