MCPcopy Create free account
hub / github.com/CodeGraphContext/CodeGraphContext / getAuthHeaders

Function getAuthHeaders

website/src/lib/repo-provider.ts:143–150  ·  view source on GitHub ↗
(ref: RepoRef)

Source from the content-addressed store, hash-verified

141}
142
143export function getAuthHeaders(ref: RepoRef): Record<string, string> {
144 const token = localStorage.getItem(getAuthTokenKey(ref));
145 if (!token) return {};
146 if (ref.provider === "gitlab") {
147 return { "PRIVATE-TOKEN": token };
148 }
149 return { Authorization: `token ${token}` };
150}
151
152export function getBranchesToTry(detectedBranch: string): string[] {
153 return Array.from(new Set([detectedBranch, ...DEFAULT_BRANCHES]));

Callers 3

fetchRepositoryFilesFunction · 0.90
resolveRepoMetadataFunction · 0.85
listRepositoryFilesFunction · 0.85

Calls 1

getAuthTokenKeyFunction · 0.85

Tested by

no test coverage detected