mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-28 20:46:57 +02:00
fix(tooling): keep gitignore changes scoped
This commit is contained in:
@@ -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 =
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user