MCPcopy Create free account
hub / github.com/braintrustdata/bash-agent-evals / getOrCreateUser

Function getOrCreateUser

src/data/transform.ts:28–39  ·  view source on GitHub ↗
(login: string, id: number)

Source from the content-addressed store, hash-verified

26const events: GitHubEvent[] = [];
27
28function 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
41function getOrCreateRepo(repoName: string, repoId: number): RepoFile {
42 if (!repos.has(repoName)) {

Callers 1

processEventFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected