MCPcopy Create free account
hub / github.com/alibaba/open-code-review / stepText

Function stepText

scripts/github-actions/release-contract.test.js:27–33  ·  view source on GitHub ↗
(job, name)

Source from the content-addressed store, hash-verified

25}
26
27function stepText(job, name) {
28 const lines = jobText(job).split("\n");
29 const start = lines.indexOf(` - name: ${name}`);
30 assert.ok(start >= 0, `missing step ${name}`);
31 const end = lines.findIndex((line, index) => index > start && /^ - /.test(line));
32 return lines.slice(start, end < 0 ? undefined : end).join("\n");
33}
34
35function runBlock(step) {
36 const lines = step.split("\n");

Callers 1

Calls 1

jobTextFunction · 0.85

Tested by

no test coverage detected