File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -485,7 +485,14 @@ jobs:
485485 // The whole repo IS the driver. Count a merge as source-affecting when it changes a file under src/.
486486 // Docs/CI/test-only merges do not warrant a full multi-language fan-out.
487487 const isSource = (f) => f.startsWith('src/');
488- const srcChanged = files.some((f) => isSource(f.filename));
488+ // GitHub caps pulls.listFiles at 3000 files per PR (even via paginate). If a merge is that
489+ // large the list is truncated, so a src/ file could sort beyond the cap and be missed. Since
490+ // the whole gate hinges on this boolean, treat a truncated result set as source-affecting.
491+ const truncated = files.length >= 3000;
492+ const srcChanged = truncated || files.some((f) => isSource(f.filename));
493+ if (truncated) {
494+ console.log('listFiles hit the 3000-file cap; treating merge as source-affecting.');
495+ }
489496 console.log(`driver source changed: ${srcChanged}`);
490497 core.setOutput('source', srcChanged.toString());
491498
You can’t perform that action at this time.
0 commit comments