Add exempt-issue-types option for blocklist filter by issue type (#1294)

* Add exempt-issue-types option for blocklist filter by issue type

* Add missing input reading for exempt-issue-types

* Keep exempt issue types from filtering pull requests

* Document exempt issue type precedence
This commit is contained in:
Josh Schultz
2026-09-10 10:39:36 -05:00
committed by GitHub
parent a3fff30a8a
commit f01e4de246
8 changed files with 257 additions and 2 deletions

View File

@@ -268,6 +268,24 @@ export class IssuesProcessor {
}
}
// exemptIssueTypes wins if both it and onlyIssueTypes are specified
if (this.options.exemptIssueTypes && !issue.isPullRequest) {
const exemptTypes = this.options.exemptIssueTypes
.split(',')
.map(t => t.trim().toLowerCase())
.filter(Boolean);
const issueType = (issue.issue_type || '').toLowerCase();
if (exemptTypes.includes(issueType)) {
issueLogger.info(
`Skipping this $$type because its type ('${
issue.issue_type
}') is in exemptIssueTypes (${exemptTypes.join(', ')})`
);
IssuesProcessor._endIssueProcessing(issue);
return;
}
}
const onlyLabels: string[] = wordsToList(this._getOnlyLabels(issue));
if (onlyLabels.length > 0) {