From 0dcc448fbf13780e37fd11cd805319c2a6424150 Mon Sep 17 00:00:00 2001 From: luciferlive112116 <291889058+luciferlive112116@users.noreply.github.com> Date: Wed, 1 Jul 2026 17:29:40 +0800 Subject: [PATCH] fix(signals): match hyphenated ci-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..6fcbad5c2a 100644 --- a/src/signals/engine.ts +++ b/src/signals/engine.ts @@ -4977,8 +4977,9 @@ export function hasClearNoIssueRationale(pr: Pick { }); }); +describe("hasClearNoIssueRationale ci-only spelling", () => { + it("recognizes hyphenated and spaced ci-only rationales", () => { + expect(hasClearNoIssueRationale({ title: "ci only: tighten workflow cache", body: "" })).toBe(true); + expect(hasClearNoIssueRationale({ title: "ci-only: tighten workflow cache", body: "" })).toBe(true); + expect(hasClearNoIssueRationale({ title: "Tune deploy gate", body: "This is a ci only workflow tweak." })).toBe(true); + }); + + it("still rejects unrelated PR text that mentions CI without a rationale", () => { + expect(hasClearNoIssueRationale({ title: "Fix CI flake in queue tests", body: "Stabilizes a failing job." })).toBe(false); + expect(hasClearNoIssueRationale({ title: "Improve GitHub Actions setup", body: "" })).toBe(false); + }); +}); + function snapshot( id: string, repositories: Array<{