Function
getOrCreateUser
(login: string, id: number)
Source from the content-addressed store, hash-verified
| 26 | const events: GitHubEvent[] = []; |
| 27 | |
| 28 | function getOrCreateUser(login: string, id: number): UserFile { |
| 29 | if (!users.has(login)) { |
| 30 | users.set(login, { |
| 31 | id, |
| 32 | login, |
| 33 | issues_opened: 0, |
| 34 | prs_opened: 0, |
| 35 | comments_made: 0, |
| 36 | }); |
| 37 | } |
| 38 | return users.get(login)!; |
| 39 | } |
| 40 | |
| 41 | function getOrCreateRepo(repoName: string, repoId: number): RepoFile { |
| 42 | if (!repos.has(repoName)) { |
Tested by
no test coverage detected