mirror of
https://github.com/actions/stale.git
synced 2025-12-11 20:47:10 +00:00
feat(assignees): add 6 new options to avoid stale for assignees (#327)
* feat(assignees): add new option to avoid stale for assignees closes #271 * test: add more coverage * docs: fix readme format issue * docs: reorder and enhance typo * docs(contributing): add more information about the npm scripts
This commit is contained in:
committed by
GitHub
parent
996798eb71
commit
ec96ff65b0
@@ -1,4 +1,5 @@
|
||||
import {Issue} from '../../src/classes/issue';
|
||||
import {IAssignee} from '../../src/interfaces/assignee';
|
||||
import {IIssuesProcessorOptions} from '../../src/interfaces/issues-processor-options';
|
||||
import {IsoDateString} from '../../src/types/iso-date-string';
|
||||
|
||||
@@ -12,7 +13,8 @@ export function generateIssue(
|
||||
labels: string[] = [],
|
||||
isClosed = false,
|
||||
isLocked = false,
|
||||
milestone: string | undefined = undefined
|
||||
milestone: string | undefined = undefined,
|
||||
assignees: string[] = []
|
||||
): Issue {
|
||||
return new Issue(options, {
|
||||
number: id,
|
||||
@@ -29,6 +31,13 @@ export function generateIssue(
|
||||
? {
|
||||
title: milestone
|
||||
}
|
||||
: undefined
|
||||
: undefined,
|
||||
assignees: assignees.map(
|
||||
(assignee: Readonly<string>): IAssignee => {
|
||||
return {
|
||||
login: assignee
|
||||
};
|
||||
}
|
||||
)
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user