(username?: string)
| 14 | } |
| 15 | |
| 16 | export 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 |
| 33 | export function log(err: any, data?: any) { |
no test coverage detected