From 7183e19d60f9dcbc190215843f35d9f7ebdc1517 Mon Sep 17 00:00:00 2001 From: luciferlive112116 <291889058+luciferlive112116@users.noreply.github.com> Date: Wed, 1 Jul 2026 18:44:58 +0800 Subject: [PATCH] fix(signals): match hyphenated refactor-only no-issue rationale Co-authored-by: Cursor --- src/signals/engine.ts | 5 +++-- test/unit/signals-v2.test.ts | 13 +++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/signals/engine.ts b/src/signals/engine.ts index 939f852b3e..03c38723f4 100644 --- a/src/signals/engine.ts +++ b/src/signals/engine.ts @@ -4977,8 +4977,9 @@ export function hasClearNoIssueRationale(pr: Pick { }); }); +describe("hasClearNoIssueRationale refactor-only spelling", () => { + it("recognizes hyphenated and spaced refactor-only rationales", () => { + expect(hasClearNoIssueRationale({ title: "refactor only: split helper", body: "" })).toBe(true); + expect(hasClearNoIssueRationale({ title: "refactor-only: split helper", body: "" })).toBe(true); + expect(hasClearNoIssueRationale({ title: "Rename queue module", body: "This is a refactor only rename." })).toBe(true); + }); + + it("still rejects unrelated PR text that mentions refactors without a rationale", () => { + expect(hasClearNoIssueRationale({ title: "Refactor queue processor", body: "Extracts shared helper." })).toBe(false); + expect(hasClearNoIssueRationale({ title: "Improve signal engine structure", body: "" })).toBe(false); + }); +}); + function snapshot( id: string, repositories: Array<{