MCPcopy
hub / github.com/PatrickJS/awesome-cursorrules / resolveUser

Function resolveUser

scripts/check-pr-author.mjs:73–90  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

71}
72
73async function resolveUser(args) {
74 if (args.userJson) {
75 return readUserJson(args.userJson);
76 }
77
78 if (args.createdAt) {
79 return {
80 login: args.username,
81 created_at: args.createdAt,
82 };
83 }
84
85 if (!args.username) {
86 return {};
87 }
88
89 return fetchGitHubUser(args.username);
90}
91
92function readUserJson(filePath) {
93 if (!existsSync(filePath)) {

Callers 1

Calls 2

readUserJsonFunction · 0.85
fetchGitHubUserFunction · 0.85

Tested by

no test coverage detected