Skip to content

Commit 02af382

Browse files
committed
fix(ci): pass release metadata refs as options
1 parent 2bb0736 commit 02af382

2 files changed

Lines changed: 17 additions & 1 deletion

File tree

scripts/check-changed.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,6 @@ export function createChangedCheckPlan(result, options = {}) {
355355
if (lanes.releaseMetadata) {
356356
add("release metadata guard", [
357357
"release-metadata:check",
358-
"--",
359358
...(options.staged
360359
? ["--staged"]
361360
: ["--base", options.base ?? "origin/main", "--head", options.head ?? "HEAD"]),

test/scripts/changed-lanes.test.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1354,6 +1354,23 @@ describe("scripts/changed-lanes", () => {
13541354
"config:docs:check",
13551355
"deps:root-ownership:check",
13561356
]);
1357+
expect(plan.commands.find((command) => command.args[0] === "release-metadata:check")?.args).toEqual([
1358+
"release-metadata:check",
1359+
"--staged",
1360+
]);
1361+
});
1362+
1363+
it("passes release metadata base and head refs as options", () => {
1364+
const result = detectChangedLanes(["CHANGELOG.md"]);
1365+
const plan = createChangedCheckPlan(result, { base: "main", head: "feature" });
1366+
1367+
expect(plan.commands.find((command) => command.args[0] === "release-metadata:check")?.args).toEqual([
1368+
"release-metadata:check",
1369+
"--base",
1370+
"main",
1371+
"--head",
1372+
"feature",
1373+
]);
13571374
});
13581375

13591376
it("keeps docs plus changelog entries on the docs-only changed gate", () => {

0 commit comments

Comments
 (0)