(jobName, nextJobName)
| 14 | const awesomeLintJob = workflow.slice(workflow.indexOf(" awesome-lint:")); |
| 15 | |
| 16 | function 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 | |
| 26 | test("repo hygiene workflow grants read-only contents permission", () => { |
| 27 | assert.match(workflow, /^permissions:\n\s+contents:\s+read\s*$/m); |
no outgoing calls
no test coverage detected