diff --git a/scripts/changed-lanes.mjs b/scripts/changed-lanes.mjs index 03e1061242e..3c5c7bf15ac 100644 --- a/scripts/changed-lanes.mjs +++ b/scripts/changed-lanes.mjs @@ -7,7 +7,7 @@ const APP_PATH_RE = /^(?:apps\/|Swabble\/|appcast\.xml$)/u; const EXTENSION_PATH_RE = /^extensions\/[^/]+(?:\/|$)/u; const CORE_PATH_RE = /^(?:src\/|ui\/|packages\/)/u; const TOOLING_PATH_RE = - /^(?:scripts\/|test\/vitest\/|\.github\/|git-hooks\/|vitest(?:\..+)?\.config\.ts$|tsconfig.*\.json$|\.oxlint.*|\.oxfmt.*)/u; + /^(?:scripts\/|test\/vitest\/|\.github\/|git-hooks\/|vitest(?:\..+)?\.config\.ts$|tsconfig.*\.json$|\.gitignore$|\.oxlint.*|\.oxfmt.*)/u; const ROOT_GLOBAL_PATH_RE = /^(?:package\.json$|pnpm-lock\.yaml$|pnpm-workspace\.yaml$|tsdown\.config\.ts$|vitest\.config\.ts$)/u; const TEST_PATH_RE = diff --git a/test/scripts/changed-lanes.test.ts b/test/scripts/changed-lanes.test.ts index df99c575a6d..af2eb9aac8b 100644 --- a/test/scripts/changed-lanes.test.ts +++ b/test/scripts/changed-lanes.test.ts @@ -160,6 +160,20 @@ describe("scripts/changed-lanes", () => { expect(plan.commands.map((command) => command.args[0])).toContain("tsgo:all"); }); + it("routes gitignore changes to tooling instead of all lanes", () => { + const result = detectChangedLanes([".gitignore"]); + const plan = createChangedCheckPlan(result); + + expect(result.lanes).toMatchObject({ + tooling: true, + all: false, + }); + expect(plan.runFullTests).toBe(false); + expect(plan.runChangedTestsBroad).toBe(false); + expect(plan.commands.map((command) => command.args[0])).toContain("lint:scripts"); + expect(plan.commands.map((command) => command.args[0])).not.toContain("tsgo:all"); + }); + it("keeps release metadata commits off the full changed gate", () => { const result = detectChangedLanes([ "CHANGELOG.md",