mirror of
https://github.com/tiennm99/is-a-dev.git
synced 2026-08-22 18:25:34 +00:00
Merge branch 'main' into patch-11
This commit is contained in:
@@ -41,6 +41,9 @@ jobs:
|
||||
repository: is-a-dev/register
|
||||
path: register-${{ github.run_id }}
|
||||
|
||||
- run: ls domain -1 | wc -l
|
||||
- run: ls register-${{ github.run_id }}/domains -1 | wc -l
|
||||
|
||||
- run: npm install
|
||||
|
||||
- name: Get all modified domain JSON files
|
||||
|
||||
+3
-6
@@ -50,12 +50,9 @@ 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);
|
||||
|
||||
console.log("Head files", headDomainsFiles.filter((file) => MODIFIED_FILES.includes(`domains/${file}`)));
|
||||
|
||||
console.log("Modified files", MODIFIED_FILES.map((file) => file.substring(file.lastIndexOf("/") + 1)));
|
||||
|
||||
const newFiles = MODIFIED_FILES.map((file) => !headDomainsFiles.includes(file.substring(file.lastIndexOf("/") + 1)));
|
||||
|
||||
// get list of all files that are in the base dir but not in the head dir
|
||||
const newFiles = headDomainsFiles.filter((file) => !fs.existsSync(path.join(domainsPath, file)));
|
||||
|
||||
console.log("New files", newFiles);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user