mirror of
https://github.com/tiennm99/is-a-dev.git
synced 2026-08-08 12:23:54 +00:00
Merge branch 'main' into patch-11
This commit is contained in:
+15
-16
@@ -1,21 +1,20 @@
|
||||
name: StaleBOT
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
name: 'Force cleanup'
|
||||
schedule:
|
||||
- cron: "30 14 * * *"
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "30 14 * * *"
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v3
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
days-before-stale: 7
|
||||
days-before-close: 3
|
||||
stale-issue-message: 'This issue has been marked as stale due to inactivity and will be closed. Comment anything on this issue to prevent it'
|
||||
stale-pr-message: 'This pull request has been marked as stale due to inactivity and will be closed. Comment anything on this PR to prevent it'
|
||||
exempt-issue-labels: 'no-stale'
|
||||
exempt-pr-labels: 'no-stale'
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v3
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
days-before-stale: 7
|
||||
days-before-close: 3
|
||||
stale-issue-message: "This issue has been marked as stale due to inactivity and will be closed. Comment anything on this issue to prevent it"
|
||||
stale-pr-message: "This pull request has been marked as stale due to inactivity and will be closed. Comment anything on this PR to prevent it"
|
||||
exempt-issue-labels: "no-stale"
|
||||
exempt-pr-labels: "no-stale"
|
||||
|
||||
@@ -38,4 +38,14 @@ jobs:
|
||||
|
||||
- run: npm install
|
||||
|
||||
- name: Get modified files
|
||||
if: github.event_name == 'pull_request'
|
||||
id: files
|
||||
run: |
|
||||
echo "::set-output name=files::$(git diff --name-only ${{ github.event.before }} ${{ github.sha }})"
|
||||
|
||||
- run: npm test
|
||||
env:
|
||||
EVENT: ${{ github.event_name }}
|
||||
PR_AUTHOR: ${{ github.event.pull_request.user.login }}
|
||||
MODIFIED_FILES: ${{ steps.files.outputs.files || '' }}
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
{
|
||||
"owner": {
|
||||
"username": "Yunexiz",
|
||||
"discord": "1040303561847881729"
|
||||
},
|
||||
"record": {
|
||||
"A": [
|
||||
"185.199.109.153",
|
||||
"185.199.108.153",
|
||||
"185.199.110.153",
|
||||
"185.199.111.153"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"owner": {
|
||||
"username": "Yunexiz",
|
||||
"discord": "1040303561847881729"
|
||||
},
|
||||
"record": {
|
||||
"TXT": "a39a9e9549128753e8f6757a37d2c2"
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"owner": {
|
||||
"username": "yunexiz",
|
||||
"discord": "1040303561847881729"
|
||||
},
|
||||
"record": {
|
||||
"TXT": "44acf50d05a09c5bdcb82f64551e6c"
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"owner": {
|
||||
"username": "yunexiz",
|
||||
"discord": "1040303561847881729"
|
||||
},
|
||||
"record": {
|
||||
"CNAME": "ai-y.onrender.com"
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"owner": {
|
||||
"username": "yunexiz",
|
||||
"discord": "1040303561847881729"
|
||||
},
|
||||
"record": {
|
||||
"CNAME": "ai-y-main.pages.dev"
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"owner": {
|
||||
"username": "yunexiz",
|
||||
"discord": "1040303561847881729"
|
||||
},
|
||||
"record": {
|
||||
"CNAME": "yunexiz.github.io"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"owner": {
|
||||
"username": "riotoff",
|
||||
"discord": "1040929084684902460"
|
||||
},
|
||||
"record": {
|
||||
"CNAME": "riotoff.github.io"
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"owner": {
|
||||
"username": "shockbs",
|
||||
"email": "apipherng@gmail.com"
|
||||
},
|
||||
"record": {
|
||||
"CNAME": "na-west1.surge.sh"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
const t = require("ava");
|
||||
const fs = require("fs-extra");
|
||||
const path = require("path");
|
||||
|
||||
const PR_AUTHOR = process.env.PR_AUTHOR;
|
||||
const MODIFIED_FILES = process.env.MODIFIED_FILES.split(",");
|
||||
|
||||
const domainsPath = path.resolve("domains");
|
||||
|
||||
const admins = require("../util/administrators.json");
|
||||
|
||||
t("Modified JSON files must be owned by the PR author", (t) => {
|
||||
if(process.env.EVENT !== "pull_request") {
|
||||
t.pass();
|
||||
return;
|
||||
}
|
||||
|
||||
MODIFIED_FILES.forEach((file) => {
|
||||
const domain = fs.readJsonSync(path.join(domainsPath, file));
|
||||
|
||||
t.true(
|
||||
domain.owner.username === PR_AUTHOR || admins.includes(PR_AUTHOR),
|
||||
`${file}: Owner is ${domain.owner.username} but ${PR_AUTHOR} is the PR author`
|
||||
);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,4 @@
|
||||
[
|
||||
"wdhdev",
|
||||
"DEV-DIBSTER"
|
||||
]
|
||||
@@ -8,7 +8,9 @@
|
||||
"api",
|
||||
"auth",
|
||||
"authentication",
|
||||
"authorisation",
|
||||
"authorise",
|
||||
"authorization",
|
||||
"authorize",
|
||||
"aux",
|
||||
"billing",
|
||||
@@ -17,6 +19,7 @@
|
||||
"cart",
|
||||
"catalog",
|
||||
"checkout",
|
||||
"co",
|
||||
"com",
|
||||
"com[1-9]",
|
||||
"con",
|
||||
@@ -74,7 +77,6 @@
|
||||
"payments",
|
||||
"portal",
|
||||
"postmaster",
|
||||
"prn",
|
||||
"recovery",
|
||||
"redirect",
|
||||
"registrar",
|
||||
|
||||
Reference in New Issue
Block a user