MCPcopy Create free account
hub / github.com/delinoio/oss / workflowScript

Function workflowScript

scripts/release/legacy-cli-release.test.mjs:48–62  ·  view source on GitHub ↗
(source, name)

Source from the content-addressed store, hash-verified

46 return directory;
47}
48function workflowScript(source, name) {
49 const lines = source.split("\n");
50 const step = lines.findIndex((line) => line.trim() === `- name: ${name}`);
51 assert.ok(step >= 0, `${name} step exists`);
52 const run = lines.findIndex(
53 (line, index) => index > step && line === " run: |",
54 );
55 assert.ok(run > step, `${name} shell body exists`);
56 const body = [];
57 for (let index = run + 1; index < lines.length; index++) {
58 if (lines[index] && !lines[index].startsWith(" ")) break;
59 body.push(lines[index].slice(10));
60 }
61 return body.join("\n");
62}
63test("legacy workflow archive steps retain executable names and complete terms", (t) => {
64 const license = readFileSync(new URL("../../LICENSE", import.meta.url));
65 const notice = readFileSync(new URL("../../NOTICE", import.meta.url));

Callers 1

Calls 2

pushMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected