From f6232bc2b49e58ffcb80c679829e24d5019d3c68 Mon Sep 17 00:00:00 2001 From: Shadow Date: Fri, 13 Feb 2026 13:40:56 -0600 Subject: [PATCH] CI: close invalid items without response --- .github/workflows/auto-response.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/auto-response.yml b/.github/workflows/auto-response.yml index 29b4d05008..38b820d183 100644 --- a/.github/workflows/auto-response.yml +++ b/.github/workflows/auto-response.yml @@ -131,6 +131,8 @@ jobs: } } + const invalidLabel = "invalid"; + const pullRequest = context.payload.pull_request; if (pullRequest) { const labelCount = labelSet.size; @@ -149,6 +151,26 @@ jobs: }); return; } + if (labelSet.has(invalidLabel)) { + await github.rest.issues.update({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: pullRequest.number, + state: "closed", + }); + return; + } + } + + if (issue && labelSet.has(invalidLabel)) { + await github.rest.issues.update({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: issue.number, + state: "closed", + state_reason: "not_planned", + }); + return; } const rule = rules.find((item) => labelSet.has(item.label));