MCPcopy Create free account
hub / github.com/EndBug/add-and-commit / getUserInfo

Function getUserInfo

src/util.ts:16–30  ·  view source on GitHub ↗
(username?: string)

Source from the content-addressed store, hash-verified

14}
15
16export async function getUserInfo(username?: string) {
17 if (!username) return undefined;
18
19 const octokit = getOctokitClient();
20 const res = await octokit.rest.users.getByUsername({username});
21
22 core.debug(
23 `Fetched github actor from the API: ${JSON.stringify(res?.data, null, 2)}`,
24 );
25
26 return {
27 name: res?.data?.name,
28 email: res?.data?.email,
29 };
30}
31
32// eslint-disable-next-line @typescript-eslint/no-explicit-any
33export function log(err: any, data?: any) {

Callers 1

checkInputsFunction · 0.90

Calls 2

stringifyMethod · 0.80
getOctokitClientFunction · 0.70

Tested by

no test coverage detected