feat(statistics): display some stats in the logs (#337)

* test: add more coverage

* docs: reorder and enhance typo

* docs(contributing): add more information about the npm scripts

* feat(statistics): add simple statistics

* feat(statistics): add more stats

* refactor(issues-processor): remove some options from the constructor

it should have been only useful for the tests

* feat(statistics): add stats for new stale or undo stale issues

* chore(rebase): handle rebase conflicts
This commit is contained in:
Geoffrey Testelin
2021-03-01 21:34:35 +01:00
committed by GitHub
parent 63ae8ac024
commit 419a53bc05
17 changed files with 1021 additions and 679 deletions

View File

@@ -1,6 +1,6 @@
import {Issue} from '../src/classes/issue';
import {IssuesProcessor} from '../src/classes/issues-processor';
import {IIssuesProcessorOptions} from '../src/interfaces/issues-processor-options';
import {IssuesProcessorMock} from './classes/issues-processor-mock';
import {DefaultProcessorOptions} from './constants/default-processor-options';
import {generateIssue} from './functions/generate-issue';
@@ -21,7 +21,7 @@ interface ITestData {
describe('assignees options', (): void => {
let opts: IIssuesProcessorOptions;
let testIssueList: Issue[];
let processor: IssuesProcessor;
let processor: IssuesProcessorMock;
const setTestIssueList = (
isPullRequest: boolean,
@@ -46,7 +46,7 @@ describe('assignees options', (): void => {
};
const setProcessor = () => {
processor = new IssuesProcessor(
processor = new IssuesProcessorMock(
opts,
async () => 'abot',
async p => (p === 1 ? testIssueList : []),