@kakarot-ci/core 0.6.0 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -703,19 +703,18 @@ async function analyzeFile(filePath, content, changedRanges, ref, githubClient,
|
|
|
703
703
|
}
|
|
704
704
|
|
|
705
705
|
// src/utils/test-target-extractor.ts
|
|
706
|
+
import { minimatch } from "minimatch";
|
|
706
707
|
async function extractTestTargets(files, githubClient, prHeadRef, config) {
|
|
707
708
|
info(`Analyzing ${files.length} file(s) for test targets`);
|
|
708
709
|
const diffs = parsePullRequestFiles(files);
|
|
709
710
|
const filteredDiffs = diffs.filter((diff) => {
|
|
710
711
|
const matchesInclude = config.includePatterns.some((pattern) => {
|
|
711
|
-
|
|
712
|
-
return regex.test(diff.filename);
|
|
712
|
+
return minimatch(diff.filename, pattern);
|
|
713
713
|
});
|
|
714
714
|
if (!matchesInclude)
|
|
715
715
|
return false;
|
|
716
716
|
const matchesExclude = config.excludePatterns.some((pattern) => {
|
|
717
|
-
|
|
718
|
-
return regex.test(diff.filename);
|
|
717
|
+
return minimatch(diff.filename, pattern);
|
|
719
718
|
});
|
|
720
719
|
return !matchesExclude;
|
|
721
720
|
});
|