mirror of
https://github.com/actions/stale.git
synced 2025-12-30 11:58:18 +00:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user