Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore pinned issues #3

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion __tests__/any-of-labels.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1141,7 +1141,9 @@ class IssuesProcessorBuilder {
this._options,
async p => (p === 1 ? this._issues : []),
async () => [],
async () => new Date().toDateString()
() => new Date().toDateString(),
async () => undefined,
async () => []
);
}
}
4 changes: 3 additions & 1 deletion __tests__/assignees.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ describe('assignees options', (): void => {
opts,
async p => (p === 1 ? testIssueList : []),
async () => [],
async () => new Date().toDateString()
() => new Date().toDateString(),
async () => undefined,
async () => []
);
};

Expand Down
11 changes: 9 additions & 2 deletions __tests__/classes/issues-processor-mock.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {Issue} from '../../src/classes/issue';
import {IssuesProcessor} from '../../src/classes/issues-processor';
import {IComment} from '../../src/interfaces/comment';
import { IIssueEvent } from '../../src/interfaces/issue-event';
import {IIssuesProcessorOptions} from '../../src/interfaces/issues-processor-options';
import {IPullRequest} from '../../src/interfaces/pull-request';

Expand All @@ -13,10 +14,12 @@ export class IssuesProcessorMock extends IssuesProcessor {
sinceDate: string
) => Promise<IComment[]>,
getLabelCreationDate?: (
events: IIssueEvent[],
issue: Issue,
label: string
) => Promise<string | undefined>,
getPullRequest?: (issue: Issue) => Promise<IPullRequest | undefined | void>
) => string | undefined,
getPullRequest?: (issue: Issue) => Promise<IPullRequest | undefined | void>,
getIssueEvents?: (issue: Issue) => Promise<IIssueEvent[]>
) {
super(options);

Expand All @@ -35,5 +38,9 @@ export class IssuesProcessorMock extends IssuesProcessor {
if (getPullRequest) {
this.getPullRequest = getPullRequest;
}

if (getIssueEvents) {
this.getIssueEvents = getIssueEvents;
}
}
}
5 changes: 3 additions & 2 deletions __tests__/exempt-draft-pr.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class IssuesProcessorBuilder {
this._options,
async p => (p === 1 ? this._issues : []),
async () => [],
async () => new Date().toDateString(),
() => new Date().toDateString(),
async (): Promise<IPullRequest> => {
return Promise.resolve({
number: 0,
Expand All @@ -134,7 +134,8 @@ class IssuesProcessorBuilder {
repo: null
}
});
}
},
async () => []
);
}
}
Loading