From d4701a5348a8de97538828818ad6cf28c3266faf Mon Sep 17 00:00:00 2001 From: MachieCodes Date: Fri, 2 May 2025 14:31:16 -0500 Subject: [PATCH 1/7] Fix Editorconfig --- .editorconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.editorconfig b/.editorconfig index b7224154e2..42264b9625 100644 --- a/.editorconfig +++ b/.editorconfig @@ -5,7 +5,7 @@ insert_final_newline = true trim_trailing_whitespace = true indent_size = 4 -[*.{json, yml}] +[*.{json,yml}] indent_size = 2 [*.md] From 5286eea3342cfc7bc29e473f1b35fa559b347f37 Mon Sep 17 00:00:00 2001 From: MachieCodes Date: Fri, 2 May 2025 14:31:27 -0500 Subject: [PATCH 2/7] Ignore Modules --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 54d4c59f04..9502ead59a 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ run bin logs .github/builds/node_modules +.github/moderation/node_modules *.iws *.ipr *.iml From 022a6ad0384a430ea0918bed4bf7a1b3fe769d29 Mon Sep 17 00:00:00 2001 From: MachieCodes Date: Fri, 2 May 2025 14:34:38 -0500 Subject: [PATCH 3/7] Issue Moderation Checks for banned terms and removes the external template check since there's no option but to follow the templates --- .github/moderation/banned_terms.js | 152 +++++++++++++++ .github/moderation/package-lock.json | 258 ++++++++++++++++++++++++++ .github/moderation/package.json | 14 ++ .github/workflows/issue-moderator.yml | 31 ++-- 4 files changed, 443 insertions(+), 12 deletions(-) create mode 100644 .github/moderation/banned_terms.js create mode 100644 .github/moderation/package-lock.json create mode 100644 .github/moderation/package.json diff --git a/.github/moderation/banned_terms.js b/.github/moderation/banned_terms.js new file mode 100644 index 0000000000..d66f941974 --- /dev/null +++ b/.github/moderation/banned_terms.js @@ -0,0 +1,152 @@ +import * as github from '@actions/github'; +import * as core from "@actions/core"; + +const otherModTerms = [ + "feather", + "lunar", + "labymod", + "tlauncher", + "pojav", + "optifine", + "optifabric", + "wurst", + "origins" +]; + +const anticheatTerms = [ + "matrix", + "disabler", + "bypass", + "ncp", + "nocheat plus", + "vulcan", + "grim", + "wraith", + "antiaura", + "anticheataddition", + "godseye", + "anti xray" +]; + +const featureTerms = [ + "infinite reach", + "godmode", + "portal godmode", + "dupe", + "ping bypass", + "tp aura", + "force op", + ".panic", + "anti vanish" +]; + +const token = process.env.GITHUB_TOKEN; +const octokit = github.getOctokit(token); +const context = github.context + + +const title = context.payload.issue.title; +const body = context.payload.issue.body; + +async function run() { + const issueText = `${title} ${body}`.toLowerCase(); + + for (const term of otherModTerms) { + if (!checkTerm(issueText, term)) continue; + + const otherModMessage = + 'Meteor does not offer support for "legit clients" like Lunar or Feather, or for launchers that ' + + 'support cracked accounts or work on non-desktop devices. The mod likely won\' run in tandem with ' + + 'them, and if you experience any issues while doing so you must troubleshoot any issues yourself.' + + await closeIssue(otherModMessage, octokit, context, term); + return; + } + + for (const term of anticheatTerms) { + if (!checkTerm(issueText, term)) continue; + + const anticheatMessage = + 'Meteor is intended to be used as a utility client on servers that explicitly allow its use. ' + + 'We do not intend to add workarounds for specific anticheats unless it falls within that scope.' + + await closeIssue(anticheatMessage, octokit, context, term); + return; + } + + for (const term of featureTerms) { + if (!checkTerm(issueText, term)) continue; + + const featureMessage = + 'This feature is either impossible to make, associated with cheating/griefing, or falls outside ' + + 'the scope of this project. We do not plan on adding this feature.' + + await closeIssue(featureMessage, octokit, context, term); + return; + } + + if (checkTerm(issueText, "old version")) { + const oldVersionMessage = + 'Our [archive page](https://www.meteorclient.com/archive) stores major Meteor versions for Minecraft ' + + 'versions starting at 1.21.4. If you wish to use older builds on older versions of Minecraft, you will ' + + 'need to build them yourself. **You will not receive support for issues with old versions of Meteor!**' + + await closeIssue(oldVersionMessage, octokit, context, "old version"); + return; + } + + if (checkTerm(issueText, "forge")) { + const forgeMessage = + 'Porting Meteor to Forge would take a great amount of time and effort, and would require rewriting major ' + + 'parts of the client to accommodate different APIs. Meteor does not plan to port to Forge in the future.' + + await closeIssue(forgeMessage, octokit, context, "forge"); + } +} + +function checkTerm(text, term) { + if (text.includes(term)) return true; + if (text.includes(term.replaceAll(' ', '-'))) return true; + return text.includes(term.replaceAll(' ', '')); +} + +async function closeIssue(message, octokit, context, foundTerm) { + const issueNumber = context.payload.issue.number; + const owner = context.repo.owner; + const repo = context.repo.repo; + + let closeMessage = '### This issue is being automatically closed.\n' + + `${message}` + + if (foundTerm !== '') closeMessage += + '\n' + + '\n' + + `_This issue was closed because you used the term "${foundTerm}". ` + + 'If you believe your issue is not associated with the given reason ' + + 'you may reopen it._' + + // IDE for whatever reason can't find the rest property yippee + + try { + await octokit['rest'].issues.createComment({ + owner, repo, issue_number: issueNumber, body: closeMessage + }); + + core.info('Comment added successfully.'); + } catch (error) { + core.error(`Failed to add comment: ${error.message}`); + } + + try { + await octokit['rest'].issues.update({ + owner, repo, issue_number: issueNumber, state: 'closed' + }); + + core.info('Closed issue successfully.'); + } catch (error) { + core.setFailed(`Failed to close issue: ${error.message}`); + } +} + +run(); + diff --git a/.github/moderation/package-lock.json b/.github/moderation/package-lock.json new file mode 100644 index 0000000000..2f098eca06 --- /dev/null +++ b/.github/moderation/package-lock.json @@ -0,0 +1,258 @@ +{ + "name": "moderator", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "moderator", + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "@actions/core": "^1.11.1", + "@actions/github": "^6.0.0" + } + }, + "node_modules/@actions/core": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.11.1.tgz", + "integrity": "sha512-hXJCSrkwfA46Vd9Z3q4cpEpHB1rL5NG04+/rbqW9d3+CSvtB1tYe8UTpAlixa1vj0m/ULglfEK2UKxMGxCxv5A==", + "dependencies": { + "@actions/exec": "^1.1.1", + "@actions/http-client": "^2.0.1" + } + }, + "node_modules/@actions/exec": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.1.1.tgz", + "integrity": "sha512-+sCcHHbVdk93a0XT19ECtO/gIXoxvdsgQLzb2fE2/5sIZmWQuluYyjPQtrtTHdU1YzTZ7bAPN4sITq2xi1679w==", + "dependencies": { + "@actions/io": "^1.0.1" + } + }, + "node_modules/@actions/github": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@actions/github/-/github-6.0.0.tgz", + "integrity": "sha512-alScpSVnYmjNEXboZjarjukQEzgCRmjMv6Xj47fsdnqGS73bjJNDpiiXmp8jr0UZLdUB6d9jW63IcmddUP+l0g==", + "dependencies": { + "@actions/http-client": "^2.2.0", + "@octokit/core": "^5.0.1", + "@octokit/plugin-paginate-rest": "^9.0.0", + "@octokit/plugin-rest-endpoint-methods": "^10.0.0" + } + }, + "node_modules/@actions/http-client": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.2.3.tgz", + "integrity": "sha512-mx8hyJi/hjFvbPokCg4uRd4ZX78t+YyRPtnKWwIl+RzNaVuFpQHfmlGVfsKEJN8LwTCvL+DfVgAM04XaHkm6bA==", + "dependencies": { + "tunnel": "^0.0.6", + "undici": "^5.25.4" + } + }, + "node_modules/@actions/io": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@actions/io/-/io-1.1.3.tgz", + "integrity": "sha512-wi9JjgKLYS7U/z8PPbco+PvTb/nRWjeoFlJ1Qer83k/3C5PHQi28hiVdeE2kHXmIL99mQFawx8qt/JPjZilJ8Q==" + }, + "node_modules/@fastify/busboy": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz", + "integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==", + "engines": { + "node": ">=14" + } + }, + "node_modules/@octokit/auth-token": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-4.0.0.tgz", + "integrity": "sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA==", + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/core": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-5.2.1.tgz", + "integrity": "sha512-dKYCMuPO1bmrpuogcjQ8z7ICCH3FP6WmxpwC03yjzGfZhj9fTJg6+bS1+UAplekbN2C+M61UNllGOOoAfGCrdQ==", + "dependencies": { + "@octokit/auth-token": "^4.0.0", + "@octokit/graphql": "^7.1.0", + "@octokit/request": "^8.4.1", + "@octokit/request-error": "^5.1.1", + "@octokit/types": "^13.0.0", + "before-after-hook": "^2.2.0", + "universal-user-agent": "^6.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/endpoint": { + "version": "9.0.6", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-9.0.6.tgz", + "integrity": "sha512-H1fNTMA57HbkFESSt3Y9+FBICv+0jFceJFPWDePYlR/iMGrwM5ph+Dd4XRQs+8X+PUFURLQgX9ChPfhJ/1uNQw==", + "dependencies": { + "@octokit/types": "^13.1.0", + "universal-user-agent": "^6.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/graphql": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-7.1.1.tgz", + "integrity": "sha512-3mkDltSfcDUoa176nlGoA32RGjeWjl3K7F/BwHwRMJUW/IteSa4bnSV8p2ThNkcIcZU2umkZWxwETSSCJf2Q7g==", + "dependencies": { + "@octokit/request": "^8.4.1", + "@octokit/types": "^13.0.0", + "universal-user-agent": "^6.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/openapi-types": { + "version": "24.2.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-24.2.0.tgz", + "integrity": "sha512-9sIH3nSUttelJSXUrmGzl7QUBFul0/mB8HRYl3fOlgHbIWG+WnYDXU3v/2zMtAvuzZ/ed00Ei6on975FhBfzrg==" + }, + "node_modules/@octokit/plugin-paginate-rest": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-9.2.2.tgz", + "integrity": "sha512-u3KYkGF7GcZnSD/3UP0S7K5XUFT2FkOQdcfXZGZQPGv3lm4F2Xbf71lvjldr8c1H3nNbF+33cLEkWYbokGWqiQ==", + "dependencies": { + "@octokit/types": "^12.6.0" + }, + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "@octokit/core": "5" + } + }, + "node_modules/@octokit/plugin-paginate-rest/node_modules/@octokit/openapi-types": { + "version": "20.0.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-20.0.0.tgz", + "integrity": "sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA==" + }, + "node_modules/@octokit/plugin-paginate-rest/node_modules/@octokit/types": { + "version": "12.6.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.6.0.tgz", + "integrity": "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw==", + "dependencies": { + "@octokit/openapi-types": "^20.0.0" + } + }, + "node_modules/@octokit/plugin-rest-endpoint-methods": { + "version": "10.4.1", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-10.4.1.tgz", + "integrity": "sha512-xV1b+ceKV9KytQe3zCVqjg+8GTGfDYwaT1ATU5isiUyVtlVAO3HNdzpS4sr4GBx4hxQ46s7ITtZrAsxG22+rVg==", + "dependencies": { + "@octokit/types": "^12.6.0" + }, + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "@octokit/core": "5" + } + }, + "node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/openapi-types": { + "version": "20.0.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-20.0.0.tgz", + "integrity": "sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA==" + }, + "node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types": { + "version": "12.6.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.6.0.tgz", + "integrity": "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw==", + "dependencies": { + "@octokit/openapi-types": "^20.0.0" + } + }, + "node_modules/@octokit/request": { + "version": "8.4.1", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.4.1.tgz", + "integrity": "sha512-qnB2+SY3hkCmBxZsR/MPCybNmbJe4KAlfWErXq+rBKkQJlbjdJeS85VI9r8UqeLYLvnAenU8Q1okM/0MBsAGXw==", + "dependencies": { + "@octokit/endpoint": "^9.0.6", + "@octokit/request-error": "^5.1.1", + "@octokit/types": "^13.1.0", + "universal-user-agent": "^6.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/request-error": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-5.1.1.tgz", + "integrity": "sha512-v9iyEQJH6ZntoENr9/yXxjuezh4My67CBSu9r6Ve/05Iu5gNgnisNWOsoJHTP6k0Rr0+HQIpnH+kyammu90q/g==", + "dependencies": { + "@octokit/types": "^13.1.0", + "deprecation": "^2.0.0", + "once": "^1.4.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/types": { + "version": "13.10.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.10.0.tgz", + "integrity": "sha512-ifLaO34EbbPj0Xgro4G5lP5asESjwHracYJvVaPIyXMuiuXLlhic3S47cBdTb+jfODkTE5YtGCLt3Ay3+J97sA==", + "dependencies": { + "@octokit/openapi-types": "^24.2.0" + } + }, + "node_modules/before-after-hook": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz", + "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==" + }, + "node_modules/deprecation": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", + "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==" + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/tunnel": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", + "engines": { + "node": ">=0.6.11 <=0.7.0 || >=0.7.3" + } + }, + "node_modules/undici": { + "version": "5.29.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.29.0.tgz", + "integrity": "sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg==", + "dependencies": { + "@fastify/busboy": "^2.0.0" + }, + "engines": { + "node": ">=14.0" + } + }, + "node_modules/universal-user-agent": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.1.tgz", + "integrity": "sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ==" + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + } + } +} diff --git a/.github/moderation/package.json b/.github/moderation/package.json new file mode 100644 index 0000000000..5c5ebfc4c4 --- /dev/null +++ b/.github/moderation/package.json @@ -0,0 +1,14 @@ +{ + "name": "moderator", + "version": "1.0.0", + "author": "MachieCodes", + "license": "MIT", + "type": "module", + "scripts": { + "banned_terms": "node banned_terms.js" + }, + "dependencies": { + "@actions/core": "^1.11.1", + "@actions/github": "^6.0.0" + } +} diff --git a/.github/workflows/issue-moderator.yml b/.github/workflows/issue-moderator.yml index 07fb3d6a90..5fb3a5ef39 100644 --- a/.github/workflows/issue-moderator.yml +++ b/.github/workflows/issue-moderator.yml @@ -1,26 +1,33 @@ -name: Issue automatic actions +name: Issue Automatic Actions on: issues: - types: [opened] - -permissions: - issues: write + types: [ opened ] jobs: issue-moderator: runs-on: ubuntu-latest + + permissions: + issues: write + contents: read + steps: - name: Checkout Repository uses: actions/checkout@v4 with: persist-credentials: false - - name: Automatically close issues that don't follow the issue template - uses: lucasbento/auto-close-issues@v1.0.2 + - name: Set Up Node.js + uses: actions/setup-node@v4 with: - github-token: ${{ secrets.GITHUB_TOKEN }} - issue-close-message: | - @${issue.user.login}: hello! :wave: - This issue is being automatically closed because it does not follow the issue template." - closed-issues-label: "invalid" + node-version: 22 + + - name: Install Dependencies + working-directory: ./.github/moderation + run: npm install + + - name: Check Banned Terms + run: node .github/moderation/banned_terms.js + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From b780d117f56d22207321b10cccf283ebe2d2c90a Mon Sep 17 00:00:00 2001 From: MachieCodes Date: Fri, 2 May 2025 14:38:31 -0500 Subject: [PATCH 4/7] Small Cleanup --- .github/moderation/banned_terms.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/moderation/banned_terms.js b/.github/moderation/banned_terms.js index d66f941974..16de59e55f 100644 --- a/.github/moderation/banned_terms.js +++ b/.github/moderation/banned_terms.js @@ -44,7 +44,6 @@ const token = process.env.GITHUB_TOKEN; const octokit = github.getOctokit(token); const context = github.context - const title = context.payload.issue.title; const body = context.payload.issue.body; @@ -56,7 +55,7 @@ async function run() { const otherModMessage = 'Meteor does not offer support for "legit clients" like Lunar or Feather, or for launchers that ' + - 'support cracked accounts or work on non-desktop devices. The mod likely won\' run in tandem with ' + + 'support cracked accounts, or work on non-desktop devices. The mod likely won\' run in tandem with ' + 'them, and if you experience any issues while doing so you must troubleshoot any issues yourself.' await closeIssue(otherModMessage, octokit, context, term); From afc4a07a73f1ff1b19be61a1188b654a7b892ae2 Mon Sep 17 00:00:00 2001 From: MachieCodes Date: Fri, 2 May 2025 14:45:50 -0500 Subject: [PATCH 5/7] Close as "Not Planned" --- .github/moderation/banned_terms.js | 4 ++-- .github/workflows/issue-moderator.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/moderation/banned_terms.js b/.github/moderation/banned_terms.js index 16de59e55f..3eb1ef9efc 100644 --- a/.github/moderation/banned_terms.js +++ b/.github/moderation/banned_terms.js @@ -55,7 +55,7 @@ async function run() { const otherModMessage = 'Meteor does not offer support for "legit clients" like Lunar or Feather, or for launchers that ' + - 'support cracked accounts, or work on non-desktop devices. The mod likely won\' run in tandem with ' + + 'support cracked accounts, or work on non-desktop devices. The mod likely won\'t run in tandem with ' + 'them, and if you experience any issues while doing so you must troubleshoot any issues yourself.' await closeIssue(otherModMessage, octokit, context, term); @@ -138,7 +138,7 @@ async function closeIssue(message, octokit, context, foundTerm) { try { await octokit['rest'].issues.update({ - owner, repo, issue_number: issueNumber, state: 'closed' + owner, repo, issue_number: issueNumber, state: 'closed', state_reason: 'not_planned' }); core.info('Closed issue successfully.'); diff --git a/.github/workflows/issue-moderator.yml b/.github/workflows/issue-moderator.yml index 5fb3a5ef39..f8bf34b6a0 100644 --- a/.github/workflows/issue-moderator.yml +++ b/.github/workflows/issue-moderator.yml @@ -24,7 +24,7 @@ jobs: node-version: 22 - name: Install Dependencies - working-directory: ./.github/moderation + working-directory: .github/moderation run: npm install - name: Check Banned Terms From b5750c94826a7f0279efaa4e812b55cbb7c5a1a9 Mon Sep 17 00:00:00 2001 From: MachieCodes Date: Fri, 2 May 2025 21:51:22 -0500 Subject: [PATCH 6/7] Use Clean Install --- .github/workflows/issue-moderator.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/issue-moderator.yml b/.github/workflows/issue-moderator.yml index f8bf34b6a0..e5e885996b 100644 --- a/.github/workflows/issue-moderator.yml +++ b/.github/workflows/issue-moderator.yml @@ -25,7 +25,7 @@ jobs: - name: Install Dependencies working-directory: .github/moderation - run: npm install + run: npm ci - name: Check Banned Terms run: node .github/moderation/banned_terms.js From b7128f28282a545eb54225daf4aae51bdec35bd3 Mon Sep 17 00:00:00 2001 From: MachieCodes Date: Fri, 2 May 2025 22:01:27 -0500 Subject: [PATCH 7/7] Alphabetize and Add New Terms --- .github/moderation/banned_terms.js | 48 ++++++++++++++++-------------- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/.github/moderation/banned_terms.js b/.github/moderation/banned_terms.js index 3eb1ef9efc..322959e17c 100644 --- a/.github/moderation/banned_terms.js +++ b/.github/moderation/banned_terms.js @@ -3,42 +3,46 @@ import * as core from "@actions/core"; const otherModTerms = [ "feather", - "lunar", "labymod", - "tlauncher", - "pojav", - "optifine", + "lunar", "optifabric", - "wurst", - "origins" + "optifine", + "origins", + "pojav", + "tlauncher", + "wurst" ]; const anticheatTerms = [ - "matrix", - "disabler", + "aac", + "anti xray", + "anti aura", + "anticheataddition", "bypass", + "disabler", + "donut", + "godseye", + "grim", + "matrix", "ncp", "nocheat plus", + "spartan", "vulcan", - "grim", - "wraith", - "antiaura", - "anticheataddition", - "godseye", - "anti xray" + "watchdog", + "wraith" ]; const featureTerms = [ - "infinite reach", - "godmode", - "portal godmode", + ".panic", + "anti vanish", "dupe", - "ping bypass", - "tp aura", "force op", - ".panic", - "anti vanish" -]; + "god mode", + "infinite reach", + "ping bypass", + "portal godmode", + "tp aura" +] const token = process.env.GITHUB_TOKEN; const octokit = github.getOctokit(token);