(size: number)
| 333 | |
| 334 | const title = path.split('/').pop() || path |
| 335 | const skippedForSize = (size: number): ExternalDocument => { |
| 336 | logger.info('Skipping oversized GitLab file', { path, size }) |
| 337 | return markSkipped( |
| 338 | { |
| 339 | externalId: `${FILE_PREFIX}${path}`, |
| 340 | title, |
| 341 | content: '', |
| 342 | mimeType: 'text/plain', |
| 343 | sourceUrl: buildFileSourceUrl(apiBase, encodedProject, host, projectPath, ref, path), |
| 344 | contentHash: buildFileContentHash(encodedProject, path, blobSha), |
| 345 | metadata: { contentType: 'file', title, path, size }, |
| 346 | }, |
| 347 | sizeLimitSkipReason(MAX_FILE_SIZE) |
| 348 | ) |
| 349 | } |
| 350 | |
| 351 | if (typeof file.size === 'number' && file.size > MAX_FILE_SIZE) { |
| 352 | return skippedForSize(file.size) |
no test coverage detected