diff --git a/src/index.mjs b/src/index.mjs index b3a1297..fcc4f18 100644 --- a/src/index.mjs +++ b/src/index.mjs @@ -23,6 +23,7 @@ async function ghActionBot() { COMMENT_BODY_REGEXP_FLAGS, COMMENT_ACTOR, PULL_LABEL_FILTER, + PULL_LABEL_EXCLUDE, PULL_AUTHOR_FILTER, PULL_RETEST_BODY, ACTION_RETRY_DELAY = 3000, @@ -71,6 +72,17 @@ async function ghActionBot() { return false; } + // filter out matching exclusion tags + if (PULL_LABEL_EXCLUDE) { + const exclude = PULL_LABEL_EXCLUDE.split(',').some(label => pull.labels.includes(label)); + if (exclude) { + logger.debug( + `SKIP PULL #${pull.number}: label matches exclusion labels '${PULL_LABEL_EXCLUDE}'` + ); + return false; + } + } + return { comment, pull }; }) )).filter(Boolean);