mirror of
https://github.com/tiennm99/is-a-dev.git
synced 2026-10-13 12:14:46 +00:00
Merge branch 'main' into main
This commit is contained in:
3 files changed
+53
-55
No files matched your search
@@ -24,9 +24,6 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
fetch-depth: 0
|
||||
|
||||
- run: npm install
|
||||
|
||||
@@ -44,15 +41,11 @@ jobs:
|
||||
|
||||
- name: Get changed files
|
||||
if: github.event_name == 'pull_request'
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
script: |
|
||||
const { execSync } = require("child_process");
|
||||
const files = execSync(`git diff --name-only HEAD HEAD~${context.payload.pull_request.commits}`)
|
||||
.toString()
|
||||
.split("\n")
|
||||
.filter(Boolean);
|
||||
core.exportVariable("CHANGED_FILES", JSON.stringify(files));
|
||||
run: |
|
||||
FILES=$(gh api --jq '[.[] | .filename]' /repos/{owner}/{repo}/pulls/${{ github.event.number }}/files)
|
||||
echo "CHANGED_FILES=$FILES" >> $GITHUB_ENV
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
|
||||
- name: Run tests
|
||||
run: npx ava tests/*.test.js --timeout=30s
|
||||
run: npx ava tests/*.test.js --timeout=1m
|
||||
@@ -81,25 +81,3 @@ t("Nested subdomains should be owned by the parent subdomain's owner", (t) => {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
t("Subdomains containing an underscore can only have specific records", (t) => {
|
||||
files.forEach((file) => {
|
||||
const subdomain = file.replace(/\.json$/, "");
|
||||
|
||||
if (subdomain.includes("_")) {
|
||||
const data = getDomainData(subdomain);
|
||||
const recordKeys = Object.keys(data.record);
|
||||
|
||||
if (subdomain.startsWith("_acme-challenge.") || subdomain.includes("._domainkey.")) {
|
||||
t.true(
|
||||
recordKeys.every((key) => new Set(["TXT", "CNAME"]).has(key)),
|
||||
`${file}: This type of subdomain can only have TXT or CNAME records`
|
||||
);
|
||||
} else if (subdomain.includes("._tcp.") || subdomain.includes("._udp.")) {
|
||||
t.deepEqual(recordKeys, ["SRV"], `${file}: This type of subdomain can only have SRV records`);
|
||||
} else {
|
||||
t.deepEqual(recordKeys, ["TXT"], `${file}: Subdomains with underscores can only have TXT records`);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
+47
-20
@@ -7,7 +7,6 @@
|
||||
"account",
|
||||
"accounts",
|
||||
"admin",
|
||||
"admin[1-99]",
|
||||
"admins",
|
||||
"administrator",
|
||||
"administrators",
|
||||
@@ -30,15 +29,15 @@
|
||||
"chat",
|
||||
"checkout",
|
||||
"cname",
|
||||
"cname[1-99]",
|
||||
"co",
|
||||
"codeofconduct",
|
||||
"code-of-conduct",
|
||||
"com",
|
||||
"com[1-9]",
|
||||
"con",
|
||||
"confirm",
|
||||
"confirmation",
|
||||
"contribute",
|
||||
"contributing",
|
||||
"dash",
|
||||
"dashboard",
|
||||
"default",
|
||||
@@ -54,28 +53,33 @@
|
||||
"example",
|
||||
"feedback",
|
||||
"file",
|
||||
"file[1-9999]",
|
||||
"files",
|
||||
"finance",
|
||||
"forgot",
|
||||
"forgot-password",
|
||||
"gtld",
|
||||
"guest",
|
||||
"help",
|
||||
"helpdesk",
|
||||
"helper",
|
||||
"helper[1-99]",
|
||||
"helpers",
|
||||
"hostmaster",
|
||||
"http",
|
||||
"https",
|
||||
"info",
|
||||
"infos",
|
||||
"int",
|
||||
"internal",
|
||||
"legal",
|
||||
"license",
|
||||
"login",
|
||||
"logout",
|
||||
"lpt[1-9]",
|
||||
"lpt1",
|
||||
"lpt2",
|
||||
"lpt3",
|
||||
"lpt4",
|
||||
"lpt5",
|
||||
"lpt6",
|
||||
"lpt7",
|
||||
"lpt8",
|
||||
"lpt9",
|
||||
"m",
|
||||
"mail",
|
||||
"maintainer",
|
||||
@@ -84,7 +88,6 @@
|
||||
"media",
|
||||
"mobile",
|
||||
"mod",
|
||||
"mod[1-99]",
|
||||
"mods",
|
||||
"moderator",
|
||||
"moderators",
|
||||
@@ -96,17 +99,25 @@
|
||||
"notifications",
|
||||
"notify",
|
||||
"ns",
|
||||
"ns[1-99]",
|
||||
"nul",
|
||||
"ns1",
|
||||
"ns2",
|
||||
"ns3",
|
||||
"ns4",
|
||||
"ns5",
|
||||
"ns6",
|
||||
"ns7",
|
||||
"ns8",
|
||||
"ns9",
|
||||
"oauth",
|
||||
"oauth[1-99]",
|
||||
"official",
|
||||
"operations",
|
||||
"ops",
|
||||
"org",
|
||||
"organisation",
|
||||
"organization",
|
||||
"owner",
|
||||
"owners",
|
||||
"passwordreset",
|
||||
"password-reset",
|
||||
"pay",
|
||||
"payment",
|
||||
"payments",
|
||||
@@ -119,12 +130,14 @@
|
||||
"registrar",
|
||||
"registry",
|
||||
"reset",
|
||||
"resetpassword",
|
||||
"reset-password",
|
||||
"root",
|
||||
"sales",
|
||||
"schedule",
|
||||
"secure",
|
||||
"security",
|
||||
"server",
|
||||
"servers",
|
||||
"service",
|
||||
"services",
|
||||
"session",
|
||||
@@ -134,7 +147,6 @@
|
||||
"signout",
|
||||
"signup",
|
||||
"srv",
|
||||
"srv[1-99]",
|
||||
"staff",
|
||||
"staging",
|
||||
"statistics",
|
||||
@@ -147,7 +159,15 @@
|
||||
"system",
|
||||
"teams",
|
||||
"test",
|
||||
"test[1-9999]",
|
||||
"test1",
|
||||
"test2",
|
||||
"test3",
|
||||
"test4",
|
||||
"test5",
|
||||
"test6",
|
||||
"test7",
|
||||
"test8",
|
||||
"test9",
|
||||
"termsofservice",
|
||||
"terms-of-service",
|
||||
"tld",
|
||||
@@ -155,15 +175,22 @@
|
||||
"tokens",
|
||||
"tos",
|
||||
"txt",
|
||||
"txt[1-9999]",
|
||||
"url",
|
||||
"url[1-9999]",
|
||||
"user",
|
||||
"users",
|
||||
"webmail",
|
||||
"webmaster",
|
||||
"whois",
|
||||
"www[1-99]",
|
||||
"ww",
|
||||
"www1",
|
||||
"www2",
|
||||
"www3",
|
||||
"www4",
|
||||
"www5",
|
||||
"www6",
|
||||
"www7",
|
||||
"www8",
|
||||
"www9",
|
||||
"wwww",
|
||||
"your-domain-name"
|
||||
]
|
||||
Reference in new issue
Block a user