MCPcopy
hub / github.com/cursor/community-plugins / authHeaders

Function authHeaders

apps/cursor/src/scripts/extract-from-github.ts:101–108  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

99}
100
101function authHeaders(): Record<string, string> {
102 if (!process.env.GITHUB_TOKEN) {
103 throw new Error(
104 "GITHUB_TOKEN env var is required (Code Search endpoints need auth).",
105 );
106 }
107 return { Authorization: `Bearer ${process.env.GITHUB_TOKEN}` };
108}
109
110const sleep = (ms: number) => new Promise((r) => setTimeout(r, ms));
111

Callers 1

githubSearchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected