Skip to content

Commit 3629ebd

Browse files
committed
fix
1 parent 982af17 commit 3629ebd

3 files changed

Lines changed: 31 additions & 4 deletions

File tree

dist/index.js

Lines changed: 16 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,20 @@ const pull_request_number = parseInt(process.env.GITHUB_REF?.split("/")[2]!);
2020

2121
let body: string | null = null;
2222

23-
for (const file of readdirSync(".")) {
23+
const readdirRecursively = (dir: string, files: string[] = []) => {
24+
const dirents = readdirSync(dir, { withFileTypes: true });
25+
const dirs = [];
26+
for (const dirent of dirents) {
27+
if (dirent.isDirectory()) dirs.push(`${dir}/${dirent.name}`);
28+
if (dirent.isFile()) files.push(`${dir}/${dirent.name}`);
29+
}
30+
for (const d of dirs) {
31+
files = readdirRecursively(d, files);
32+
}
33+
return files;
34+
};
35+
36+
for (const file of readdirRecursively(".")) {
2437
console.log("looking ", file, ", deciding whether skip or not...");
2538
if (!file.startsWith("compilation") || !file.endsWith(".log")) {
2639
continue;

0 commit comments

Comments
 (0)