mirror of
https://github.com/freeedcom/ai-codereviewer.git
synced 2025-06-28 20:14:14 +00:00
update
This commit is contained in:
parent
72059a0f86
commit
5b828ee105
1 changed files with 19 additions and 4 deletions
23
src/main.ts
23
src/main.ts
|
@ -226,11 +226,26 @@ async function main() {
|
||||||
.split(",")
|
.split(",")
|
||||||
.map((s) => s.trim());
|
.map((s) => s.trim());
|
||||||
|
|
||||||
const filteredDiff = parsedDiff.filter((file) => {
|
const includePatterns = core
|
||||||
|
.getInput("include")
|
||||||
|
.split(",")
|
||||||
|
.map((s) => s.trim());
|
||||||
|
if (includePatterns.length === 0) {
|
||||||
|
includePatterns.push("*")
|
||||||
|
}
|
||||||
|
|
||||||
|
let filteredDiff = parsedDiff.filter((file) => {
|
||||||
return !excludePatterns.some((pattern) => {
|
return !excludePatterns.some((pattern) => {
|
||||||
let isMatch = minimatch(file.to ?? "", pattern);
|
let isMatch = minimatch(file.to ?? "", pattern);
|
||||||
console.error(file+","+file.to+","+pattern+": "+isMatch)
|
console.error(file + "," + file.to + "," + pattern + ": " + isMatch)
|
||||||
return isMatch
|
return isMatch
|
||||||
|
}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
filteredDiff = filteredDiff.filter((file) => {
|
||||||
|
return includePatterns.some((pattern) => {
|
||||||
|
let isMatch = minimatch(file.to ?? "", pattern);
|
||||||
|
return isMatch
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue