From 1c7c2ee0cd3ce96b87db21428c1f3296763d0a25 Mon Sep 17 00:00:00 2001 From: LIghtJUNction Date: Tue, 17 Mar 2026 10:18:08 +0800 Subject: [PATCH] chore: Delete .github/workflows/pr-checklist-check.yml --- .github/workflows/pr-checklist-check.yml | 45 ------------------------ 1 file changed, 45 deletions(-) delete mode 100644 .github/workflows/pr-checklist-check.yml diff --git a/.github/workflows/pr-checklist-check.yml b/.github/workflows/pr-checklist-check.yml deleted file mode 100644 index f93eac126..000000000 --- a/.github/workflows/pr-checklist-check.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: PR Checklist Check - -on: - pull_request_target: - types: [opened, edited, reopened, synchronize] - -jobs: - check: - runs-on: ubuntu-latest - - permissions: - pull-requests: write - issues: write - - steps: - - name: Check checklist - id: check - uses: actions/github-script@v7 - with: - script: | - const body = context.payload.pull_request.body || ""; - const regex = /-\s*\[\s*x\s*\].*没有.*认真阅读/i; - const bad = regex.test(body); - core.setOutput("bad", bad); - - - name: Close PR - if: steps.check.outputs.bad == 'true' - uses: actions/github-script@v7 - with: - script: | - const pr = context.payload.pull_request; - - await github.rest.issues.createComment({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: pr.number, - body: `检测到你勾选了“我没有认真阅读”,PR 已关闭。` - }); - - await github.rest.pulls.update({ - owner: context.repo.owner, - repo: context.repo.repo, - pull_number: pr.number, - state: "closed" - }); \ No newline at end of file