MCPcopy Create free account
hub / github.com/PatrickJS/awesome-cursorrules / jobBlock

Function jobBlock

scripts/workflow-security.test.mjs:16–24  ·  view source on GitHub ↗
(jobName, nextJobName)

Source from the content-addressed store, hash-verified

14const awesomeLintJob = workflow.slice(workflow.indexOf(" awesome-lint:"));
15
16function jobBlock(jobName, nextJobName) {
17 const start = workflow.indexOf(` ${jobName}:`);
18 const end = workflow.indexOf(`\n ${nextJobName}:`);
19
20 assert.notEqual(start, -1, `${jobName} job is missing`);
21 assert.notEqual(end, -1, `${nextJobName} job is missing`);
22
23 return workflow.slice(start, end);
24}
25
26test("repo hygiene workflow grants read-only contents permission", () => {
27 assert.match(workflow, /^permissions:\n\s+contents:\s+read\s*$/m);

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected