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
19
src/main.ts
19
src/main.ts
|
@ -226,10 +226,25 @@ async function main() {
|
|||
.split(",")
|
||||
.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) => {
|
||||
let isMatch = minimatch(file.to ?? "", pattern);
|
||||
console.error(file+","+file.to+","+pattern+": "+isMatch)
|
||||
console.error(file + "," + file.to + "," + pattern + ": " + 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