(content, gateLabel)
| 64 | } |
| 65 | |
| 66 | function gateStatus(content, gateLabel) { |
| 67 | const escaped = gateLabel.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); |
| 68 | const pattern = new RegExp(`^\\|\\s*${escaped}\\s*\\|\\s*([^|]+?)\\s*\\|\\s*([^|]+?)\\s*\\|`, 'm'); |
| 69 | const match = content.match(pattern); |
| 70 | if (!match) return { pass: false, detail: 'missing gate' }; |
| 71 | return { |
| 72 | pass: match[1].trim() === 'pass', |
| 73 | detail: match[2].trim(), |
| 74 | }; |
| 75 | } |
| 76 | |
| 77 | function parseReadinessReport(projectRoot, filePath) { |
| 78 | const content = readText(filePath); |
no outgoing calls
no test coverage detected