MCPcopy
hub / github.com/MiniMax-AI/cli / ghFetch

Function ghFetch

src/update/self-update.ts:54–61  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

52}
53
54async function ghFetch(path: string): Promise<Response> {
55 const headers: Record<string, string> = {
56 'Accept': 'application/vnd.github+json',
57 'X-GitHub-Api-Version': '2022-11-28',
58 };
59 if (process.env.GITHUB_TOKEN) headers['Authorization'] = `Bearer ${process.env.GITHUB_TOKEN}`;
60 return fetch(`${GH_API}${path}`, { headers, signal: AbortSignal.timeout(10_000) });
61}
62
63async function resolveVersion(channel: Channel): Promise<string> {
64 if (channel !== 'stable' && channel !== 'latest') {

Callers 1

resolveVersionFunction · 0.85

Calls 1

fetchFunction · 0.85

Tested by

no test coverage detected