MCPcopy Create free account
hub / github.com/chakra-ui/panda / fetchGitHubUser

Function fetchGitHubUser

website/src/lib/github-utils.ts:14–27  ·  view source on GitHub ↗
(
  username: string
)

Source from the content-addressed store, hash-verified

12}
13
14export async function fetchGitHubUser(
15 username: string
16): Promise<GitHubUser | null> {
17 try {
18 const response = await fetch(`https://api.github.com/users/${username}`, {
19 next: { revalidate: 3600 } // Revalidate every hour
20 })
21 if (!response.ok) return null
22 return await response.json()
23 } catch (error) {
24 console.error(`Failed to fetch GitHub user ${username}:`, error)
25 return null
26 }
27}
28
29export async function fetchGithubUsers(
30 usernames: string[]

Callers 1

fetchGithubUsersFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected