diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-06-14 18:31:22 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-06-14 18:31:22 +0300 |
| commit | ea3a4db72f676ca180a8e0ca61c730c0cf9ed920 (patch) | |
| tree | bc0d35fca797bbb1149fa2425acdd5ace4a93d47 | |
| parent | e1446fa6b83be801f64772fdfcfa2f697de7b61f (diff) | |
ci: skip duplicate approval replies on edits
| -rw-r--r-- | .github/workflows/approve-contributor.yml | 5 |
1 files changed, 5 insertions, 0 deletions
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, |
