( repoPath: string, base: string, compare: string, files: FileRecord[], )
| 422 | } |
| 423 | |
| 424 | async function generatePatches( |
| 425 | repoPath: string, |
| 426 | base: string, |
| 427 | compare: string, |
| 428 | files: FileRecord[], |
| 429 | ): Promise<FileRecord[]> { |
| 430 | return async.mapLimit(files, PATCH_CONCURRENCY, async (file: FileRecord) => { |
| 431 | if (file.skipReason) { |
| 432 | return file; |
| 433 | } |
| 434 | |
| 435 | const result = await generatePatchForFile(repoPath, base, compare, file.path); |
| 436 | |
| 437 | if (!result.success) { |
| 438 | return { |
| 439 | ...file, |
| 440 | skipReason: result.skipReason, |
| 441 | }; |
| 442 | } |
| 443 | |
| 444 | return { |
| 445 | ...file, |
| 446 | patch: result.patch, |
| 447 | lineRanges: result.lineRanges, |
| 448 | }; |
| 449 | }); |
| 450 | } |
| 451 | |
| 452 | export async function processDiff( |
| 453 | repoPath: string, |
no test coverage detected
searching dependent graphs…