reviewbot

Source code for the is-a.dev r...
Log | Files | Refs | Activity | README | LICENSE

commit a0ccaae65c0c970576efcd5054c87054dcf727f5
parent da71cfebe7f2869caef5e485e55d9aee7b958142
Author: dragsbruh <dragsbruh@protonmail.com>
Date:   Tue, 28 Jul 2026 12:52:46 +0530

chore: change label removal logic (#89)
Diffstat:
Msrc/webhooks/closed.js | 14++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/src/webhooks/closed.js b/src/webhooks/closed.js @@ -8,11 +8,9 @@ const mergedPRs = fs.readFileSync( path.join(import.meta.dirname, '../message/merged.md'), 'utf8' ); -const unremovableLabels = [ - 'maintainer', - 'ci: bypass-owner-check', - 'no-stale', - 'r: william', +const removableLabelPrefixes = [ + 'status:', + 'reason:', ]; const reviewerUsernames = [ 'DEV-DIBSTER', @@ -78,15 +76,15 @@ export async function closed( } } - for (let i in listOfLabels) { - if (!unremovableLabels.includes(listOfLabels[i])) { + for (const label of listOfLabels) { + if (removableLabelPrefixes.some(prefix => label.startsWith(prefix))) { await appOctokit.request( 'DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}', { owner: repoOwner, repo: repoName, issue_number: prNumber, - name: listOfLabels[i], + name: label, } ); }
© notamitgamer • Site Built: 2026-09-05 01:53:16 UTC • git-mirror commit: c170d72 [view raw info]
Originally created with stagit • modified by notamitgamer
Forked from github.com/notamitgamer/git-mirror