


























@@ -322,6 +322,36 @@ describe("verify-pr-hosted-gates", () => {
322322).toThrow("Expected --output <value>.");
323323});
324324325+it("rejects duplicate hosted gate verifier CLI arguments", () => {
326+const requiredArgs = [
327+"--repo",
328+"openclaw/openclaw",
329+"--sha",
330+sha,
331+"--output",
332+".local/gates-hosted-checks.json",
333+];
334+const duplicateCases = [
335+[
336+"--repo",
337+["--repo", "openclaw/openclaw", "--repo", "fork/openclaw", "--sha", sha, "--output", "out.json"],
338+],
339+[
340+"--sha",
341+["--repo", "openclaw/openclaw", "--sha", sha, "--sha", "other-sha", "--output", "out.json"],
342+],
343+[
344+"--output",
345+["--repo", "openclaw/openclaw", "--sha", sha, "--output", "one.json", "--output", "two.json"],
346+],
347+["--changelog-only", [...requiredArgs, "--changelog-only", "--changelog-only"]],
348+] satisfies Array<[string, string[]]>;
349+350+for (const [flag, args] of duplicateCases) {
351+expect(() => parseArgs(args), flag).toThrow(`${flag} was provided more than once.`);
352+}
353+});
354+325355it("accepts JSON emitted through a colorizing GitHub CLI shim", () => {
326356expect(
327357parseWorkflowRunPages('\u001B[1;37m[{"workflow_runs":[{"id":1,"name":"CI"}]}]\u001B[0m'),
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。