mirror of
https://github.com/actions/stale.git
synced 2026-11-20 03:23:05 +00:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user