From c2706077dfa568c495be7a952b87f605230590a7 Mon Sep 17 00:00:00 2001 From: William Harrison <87287585+wdhdev@users.noreply.github.com> Date: Thu, 2 Jan 2025 20:13:04 +0800 Subject: [PATCH 1/2] Update pr.test.js --- tests/pr.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/pr.test.js b/tests/pr.test.js index dcc6ca21f..b39f16190 100644 --- a/tests/pr.test.js +++ b/tests/pr.test.js @@ -49,7 +49,7 @@ t("Modified JSON files must be owned by the PR author", async (t) => { t("New JSON files must be owned by the PR author", async (t) => { if (EVENT !== "pull_request") return t.pass(); - const headDomainsFiles = await fs.readdir(headDomainsPath); + const headDomainsFiles = fs.readdirSync(headDomainsPath); const newFiles = MODIFIED_FILES.filter((file) => !headDomainsFiles.includes(file.substring(file.lastIndexOf("/") + 1))); From 28c053b4f891d8babb97f1615f2c578f072d34b1 Mon Sep 17 00:00:00 2001 From: William Harrison <87287585+wdhdev@users.noreply.github.com> Date: Thu, 2 Jan 2025 20:13:12 +0800 Subject: [PATCH 2/2] Update pr.test.js --- tests/pr.test.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/pr.test.js b/tests/pr.test.js index b39f16190..88c220716 100644 --- a/tests/pr.test.js +++ b/tests/pr.test.js @@ -51,6 +51,8 @@ t("New JSON files must be owned by the PR author", async (t) => { const headDomainsFiles = fs.readdirSync(headDomainsPath); + console.log("Head files", headDomainsFiles); + const newFiles = MODIFIED_FILES.filter((file) => !headDomainsFiles.includes(file.substring(file.lastIndexOf("/") + 1))); console.log("New files", newFiles);