()
| 569 | const blocks = []; |
| 570 | let active = null; |
| 571 | const flush = () => { |
| 572 | if (!active) { |
| 573 | return; |
| 574 | } |
| 575 | const body = active.lines.join('\n').replace(/^\n+|\n+$/g, ''); |
| 576 | if (body && looksLikePython(body)) { |
| 577 | blocks.push({ |
| 578 | title: active.path, |
| 579 | text: body, |
| 580 | sourceLabel: active.action.toLowerCase() + ' patch' |
| 581 | }); |
| 582 | } |
| 583 | active = null; |
| 584 | }; |
| 585 | lines.forEach((line) => { |
| 586 | const fileMatch = line.match(/^\*\*\*\s+(Add|Update|Delete) File:\s+(.+)$/); |
| 587 | if (fileMatch) { |
no test coverage detected