mirror of
https://github.com/actions/stale.git
synced 2025-12-10 20:21:20 +00:00
feat(draft-pr): add new option to not process PRs which are in draft (#539)
* chore(assignees): add logs * feat(draft-pr): add new option to not process PRs which are in draft * refactor(draft-pr): create a dedicated class to handle the logic * chore(index): update index file
This commit is contained in:
committed by
GitHub
parent
303465a5d2
commit
9912fa74d1
@@ -2,6 +2,7 @@ import {Issue} from '../../src/classes/issue';
|
||||
import {IssuesProcessor} from '../../src/classes/issues-processor';
|
||||
import {IComment} from '../../src/interfaces/comment';
|
||||
import {IIssuesProcessorOptions} from '../../src/interfaces/issues-processor-options';
|
||||
import {IPullRequest} from '../../src/interfaces/pull-request';
|
||||
|
||||
export class IssuesProcessorMock extends IssuesProcessor {
|
||||
constructor(
|
||||
@@ -14,7 +15,8 @@ export class IssuesProcessorMock extends IssuesProcessor {
|
||||
getLabelCreationDate?: (
|
||||
issue: Issue,
|
||||
label: string
|
||||
) => Promise<string | undefined>
|
||||
) => Promise<string | undefined>,
|
||||
getPullRequest?: (issue: Issue) => Promise<IPullRequest | undefined | void>
|
||||
) {
|
||||
super(options);
|
||||
|
||||
@@ -29,5 +31,9 @@ export class IssuesProcessorMock extends IssuesProcessor {
|
||||
if (getLabelCreationDate) {
|
||||
this.getLabelCreationDate = getLabelCreationDate;
|
||||
}
|
||||
|
||||
if (getPullRequest) {
|
||||
this.getPullRequest = getPullRequest;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user