-
Notifications
You must be signed in to change notification settings - Fork 370
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
17 changed files
with
1,019 additions
and
677 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
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'; | ||
|
||
export class IssuesProcessorMock extends IssuesProcessor { | ||
constructor( | ||
options: IIssuesProcessorOptions, | ||
getActor?: () => Promise<string>, | ||
getIssues?: (page: number) => Promise<Issue[]>, | ||
listIssueComments?: ( | ||
issueNumber: number, | ||
sinceDate: string | ||
) => Promise<IComment[]>, | ||
getLabelCreationDate?: ( | ||
issue: Issue, | ||
label: string | ||
) => Promise<string | undefined> | ||
) { | ||
super(options); | ||
|
||
if (getActor) { | ||
this.getActor = getActor; | ||
} | ||
|
||
if (getIssues) { | ||
this.getIssues = getIssues; | ||
} | ||
|
||
if (listIssueComments) { | ||
this.listIssueComments = listIssueComments; | ||
} | ||
|
||
if (getLabelCreationDate) { | ||
this.getLabelCreationDate = getLabelCreationDate; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.