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

Function getRawFileUrl

website/src/lib/repo-provider.ts:241–246  ·  view source on GitHub ↗
(ref: RepoRef, branch: string, filePath: string)

Source from the content-addressed store, hash-verified

239}
240
241export function getRawFileUrl(ref: RepoRef, branch: string, filePath: string): string {
242 if (ref.provider === "gitlab") {
243 return `https://gitlab.com/${ref.fullPath}/-/raw/${branch}/${filePath}`;
244 }
245 return `https://raw.githubusercontent.com/${ref.owner}/${ref.repo}/${branch}/${filePath}`;
246}
247
248export function getCdnFileUrl(ref: RepoRef, branch: string, filePath: string): string | null {
249 if (ref.provider === "github") {

Callers 1

fetchRepositoryFilesFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected