@@ -192,6 +192,7 @@ describe("barnacle-auto-response", () => {
|
192 | 192 | expect(managedLabelSpecs["r: skill"].description).not.toContain("Clawdhub"); |
193 | 193 | expect(managedLabelSpecs.dirty.description).toContain("dirty/unrelated"); |
194 | 194 | expect(managedLabelSpecs["r: support"].description).toContain("support requests"); |
| 195 | +expect(managedLabelSpecs["r: false-positive"].description).toContain("false positive"); |
195 | 196 | expect(managedLabelSpecs["r: third-party-extension"].description).toContain("ClawHub"); |
196 | 197 | expect(managedLabelSpecs["r: too-many-prs"].description).toContain("ten active PRs"); |
197 | 198 | |
@@ -394,6 +395,29 @@ describe("barnacle-auto-response", () => {
|
394 | 395 | expect(calls.update).toEqual([]); |
395 | 396 | }); |
396 | 397 | |
| 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 | + |
397 | 421 | it("does not respond to maintainer comments on contributor items", async () => { |
398 | 422 | const { calls, github } = barnacleGithub([], { maintainerLogins: ["maintainer"] }); |
399 | 423 | |
|