From 73fabbe5cee5baea2511f9db47045a3935e5740a Mon Sep 17 00:00:00 2001 From: tiago <70700766+tiagozip@users.noreply.github.com> Date: Sun, 8 Feb 2026 15:59:28 +0000 Subject: [PATCH] fix workflow --- .github/workflows/auto-close-issues.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/auto-close-issues.yml b/.github/workflows/auto-close-issues.yml index f48eec1..cb90452 100644 --- a/.github/workflows/auto-close-issues.yml +++ b/.github/workflows/auto-close-issues.yml @@ -1,12 +1,9 @@ name: Auto-close empty issues - on: issues: types: [opened] - permissions: issues: write - jobs: close: runs-on: ubuntu-latest @@ -14,12 +11,10 @@ jobs: - uses: actions/github-script@v7 with: script: | - const title = title?.toLowerCase().split("#")[0].trim() === "[bug]"; + const title = context.payload.issue.title?.trim() const body = context.payload.issue.body?.toLowerCase() ?? "" - - const badTitle = title?.toLowerCase() === "[bug]" + const badTitle = title?.toLowerCase().split("#")[0].trim() === "[bug]" const badBody = body.includes("a clear and concise description of what the bug is.") - if (badTitle && badBody) { await github.rest.issues.update({ owner: context.repo.owner, @@ -27,7 +22,6 @@ jobs: issue_number: context.payload.issue.number, state: "closed" }) - await github.rest.issues.createComment({ owner: context.repo.owner, repo: context.repo.repo,