From ea3a4db72f676ca180a8e0ca61c730c0cf9ed920 Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Sun, 14 Jun 2026 18:31:22 +0300 Subject: ci: skip duplicate approval replies on edits --- .github/workflows/approve-contributor.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/approve-contributor.yml b/.github/workflows/approve-contributor.yml index 2999f8ce..28a6914d 100644 --- a/.github/workflows/approve-contributor.yml +++ b/.github/workflows/approve-contributor.yml @@ -28,6 +28,7 @@ jobs: const issueAuthor = context.payload.issue.user.login; const commenter = context.payload.comment.user.login; const commentBody = context.payload.comment.body || ''; + const action = context.payload.action; const approvedFile = '.github/APPROVED_CONTRIBUTORS'; const approveMatch = commentBody.match(/(^|\s)\/approve(?:\s+@([A-Za-z0-9](?:[A-Za-z0-9-]{0,37}[A-Za-z0-9])?))?(?=$|\s)/i); const maintainerPermissions = ['admin', 'maintain', 'write']; @@ -67,6 +68,10 @@ jobs: if (approvedList.includes(approvedUser.toLowerCase())) { console.log(`${approvedUser} is already approved`); + if (action === 'edited') { + core.setOutput('status', 'skipped'); + return; + } core.setOutput('status', 'already'); await github.rest.issues.createComment({ owner: context.repo.owner, -- cgit v1.2.3