From e25da4876b03f9e8d8262410accde0de77a0d969 Mon Sep 17 00:00:00 2001 From: shaw Date: Wed, 13 Aug 2025 14:30:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=94=B9=E8=BF=9B=20PR=20=E8=AF=84?= =?UTF-8?q?=E8=AE=BA=E6=9D=83=E9=99=90=E5=A4=84=E7=90=86=E5=92=8C=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E8=B0=83=E8=AF=95=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pr-lint-check.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-lint-check.yml b/.github/workflows/pr-lint-check.yml index b76ab50c..4c05e056 100644 --- a/.github/workflows/pr-lint-check.yml +++ b/.github/workflows/pr-lint-check.yml @@ -170,11 +170,20 @@ jobs: echo "No JavaScript files to lint" fi + - name: Debug PR Context + if: failure() + run: | + echo "PR Number: ${{ github.event.pull_request.number }}" + echo "Repo: ${{ github.repository }}" + echo "Event Name: ${{ github.event_name }}" + echo "Actor: ${{ github.actor }}" + - name: Comment PR with results if: failure() + continue-on-error: true # 即使评论失败也继续 uses: actions/github-script@v7 with: - github-token: ${{ secrets.GITHUB_TOKEN }} + github-token: ${{ secrets.GH_PAT || secrets.GITHUB_TOKEN }} script: | const fs = require('fs'); let comment = '## 🚨 Code Quality Check Failed\n\n'; @@ -233,9 +242,10 @@ jobs: - name: Success comment if: success() && steps.changed-files.outputs.any_changed == 'true' + continue-on-error: true # 即使评论失败也继续 uses: actions/github-script@v7 with: - github-token: ${{ secrets.GITHUB_TOKEN }} + github-token: ${{ secrets.GH_PAT || secrets.GITHUB_TOKEN }} script: | // 查找是否已有失败的评论 const { data: comments } = await github.rest.issues.listComments({