From 2051de8ba709b29925ea91d6a54dea887c2c0653 Mon Sep 17 00:00:00 2001 From: amd64fox <62529699+amd64fox@users.noreply.github.com> Date: Sat, 11 Oct 2025 14:06:20 +0300 Subject: [PATCH] Update auto-closes workflow to check actor login --- .github/workflows/auto-closes-false-positive.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/auto-closes-false-positive.yml b/.github/workflows/auto-closes-false-positive.yml index 2089d58..ea6a50f 100644 --- a/.github/workflows/auto-closes-false-positive.yml +++ b/.github/workflows/auto-closes-false-positive.yml @@ -17,12 +17,13 @@ jobs: script: | const issue = context.payload.issue; const title = issue.title.toLowerCase(); - const authorAssociation = issue.author_association; + const actor = context.payload.sender.login; - const privilegedRoles = ['OWNER', 'MEMBER', 'COLLABORATOR']; + // Проверяем, кто выполнил действие (не создателя issue, а того кто сейчас действует) + const privilegedUsers = ['amd64fox']; - if (privilegedRoles.includes(authorAssociation)) { - console.log('Issue #' + issue.number + ' action performed by ' + authorAssociation + ' - will not auto-close'); + if (privilegedUsers.includes(actor)) { + console.log('Issue #' + issue.number + ' action performed by @' + actor + ' - will not auto-close'); return; }