MCPcopy Create free account
hub / github.com/SIMARSINGHRAYAT/Gitzo / detectTokenType

Function detectTokenType

src/utils/github.ts:26–31  ·  view source on GitHub ↗
(token: string)

Source from the content-addressed store, hash-verified

24 */
25export async function ghFetch(path: string, token: string, options?: RequestInit) {
26 try {
27 const res = await fetch(`https://api.github.com${path}`, {
28 ...options,
29 headers: {
30 Authorization: `token ${token}`,
31 Accept: 'application/vnd.github.v3+json',
32 'X-GitHub-Api-Version': API_VERSION,
33 ...(options?.headers || {}),
34 },

Callers 1

validateTokenFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected