MCPcopy Create free account
hub / github.com/sourcebot-dev/sourcebot / getRepoIdFromShardFileName

Function getRepoIdFromShardFileName

packages/backend/src/utils.ts:60–66  ·  view source on GitHub ↗
(fileName: string)

Source from the content-addressed store, hash-verified

58}
59
60export const getRepoIdFromShardFileName = (fileName: string): number | undefined => {
61 const match = fileName.match(/^(\d+)_(\d+)_/);
62 if (!match) {
63 return undefined;
64 }
65 return parseInt(match[2], 10);
66}
67
68export const fetchWithRetry = async <T>(
69 fetchFn: () => Promise<T>,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected