mirror of
https://github.com/tiennm99/is-a-dev.git
synced 2026-10-13 18:15:40 +00:00
Update pr.test.js
This commit is contained in:
1 parent
55b60ba3f7
commit
759001598c
1 file changed
+4
-2
+4
-2
@@ -3,7 +3,7 @@ const fs = require("fs-extra");
|
||||
const path = require("path");
|
||||
|
||||
const PR_AUTHOR = process.env.PR_AUTHOR;
|
||||
const MODIFIED_FILES = (process.env.MODIFIED_FILES || "").split(" ").map(file => file.replace(/^domains\//, ""));
|
||||
const MODIFIED_FILES = (process.env.MODIFIED_FILES || "").split(" ").map((file) => file.replace(/^domains\//, ""));
|
||||
const EVENT = process.env.EVENT;
|
||||
const RUN_ID = process.env.RUN_ID;
|
||||
|
||||
@@ -47,9 +47,11 @@ t("New JSON files must be owned by the PR author", async (t) => {
|
||||
if (EVENT !== "pull_request") return t.pass();
|
||||
|
||||
const headDomainsFiles = fs.readdirSync(headDomainsPath);
|
||||
|
||||
|
||||
const newFiles = domainsPath.filter((file) => !fs.existsSync(path.join(headDomainsFiles, file)));
|
||||
|
||||
console.log(newFiles);
|
||||
|
||||
await Promise.all(
|
||||
newFiles.map(async (file) => {
|
||||
const domain = await getFileContent(domainsPath, file);
|
||||
|
||||
Reference in new issue
Block a user