Add only-issue-types option to filter issues by type (#1255)

* Add `only-issue-types` Option to Filter Issues by Type

* white-space fix in readme table

Co-authored-by: andig <cpuidle@gmail.com>

---------

Co-authored-by: andig <cpuidle@gmail.com>
This commit is contained in:
Bibo-Joshi
2025-10-03 20:57:41 +02:00
committed by GitHub
parent 3a9db7e6a4
commit 5f858e3efb
10 changed files with 193 additions and 4 deletions

View File

@@ -24,6 +24,7 @@ export class Issue implements IIssue {
markedStaleThisRun: boolean;
operations = new Operations();
private readonly _options: IIssuesProcessorOptions;
readonly issue_type?: string;
constructor(
options: Readonly<IIssuesProcessorOptions>,
@@ -43,6 +44,15 @@ export class Issue implements IIssue {
this.assignees = issue.assignees || [];
this.isStale = isLabeled(this, this.staleLabel);
this.markedStaleThisRun = false;
if (
typeof (issue as any).type === 'object' &&
(issue as any).type !== null
) {
this.issue_type = (issue as any).type.name;
} else {
this.issue_type = undefined;
}
}
get isPullRequest(): boolean {