From 7e3c32b82878ba1c48451cf3d6b62a0cde2df0e6 Mon Sep 17 00:00:00 2001 From: LIghtJUNction Date: Mon, 16 Mar 2026 02:29:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20pr-checklist-check.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pr-checklist-check.yml | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/.github/workflows/pr-checklist-check.yml b/.github/workflows/pr-checklist-check.yml index fb3fdff3a..f93eac126 100644 --- a/.github/workflows/pr-checklist-check.yml +++ b/.github/workflows/pr-checklist-check.yml @@ -5,7 +5,7 @@ on: types: [opened, edited, reopened, synchronize] jobs: - check-checklist: + check: runs-on: ubuntu-latest permissions: @@ -19,14 +19,11 @@ jobs: 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 violated + - name: Close PR if: steps.check.outputs.bad == 'true' uses: actions/github-script@v7 with: @@ -37,13 +34,7 @@ jobs: owner: context.repo.owner, repo: context.repo.repo, issue_number: pr.number, - body: `👋 @${pr.user.login} - -检测到你勾选了 **“我没有认真阅读”**。 - -请重新阅读 PR 模板并重新提交 PR。 - -This PR has been automatically closed.` + body: `检测到你勾选了“我没有认真阅读”,PR 已关闭。` }); await github.rest.pulls.update({