2021-02-28 19:15:08 +08:00
|
|
|
import {IIssue} from '../../src/interfaces/issue';
|
|
|
|
|
|
|
|
export function generateIIssue(
|
|
|
|
partialIssue?: Readonly<Partial<IIssue>>
|
|
|
|
): IIssue {
|
|
|
|
return {
|
|
|
|
milestone: undefined,
|
|
|
|
assignees: [],
|
|
|
|
labels: [],
|
|
|
|
created_at: new Date().toISOString(),
|
|
|
|
updated_at: new Date().toISOString(),
|
2023-06-22 19:20:34 +08:00
|
|
|
draft: false,
|
2021-02-28 19:15:08 +08:00
|
|
|
number: Math.round(Math.random() * 5000),
|
|
|
|
pull_request: null,
|
|
|
|
title: 'dummy-title',
|
|
|
|
locked: false,
|
|
|
|
state: 'dummy-state',
|
|
|
|
...partialIssue
|
|
|
|
};
|
|
|
|
}
|