MCPcopy Create free account
hub / github.com/idosal/git-mcp / enqueueDocumentationProcessing

Function enqueueDocumentationProcessing

src/api/tools/commonTools.ts:300–339  ·  view source on GitHub ↗
(
  owner: string,
  repo: string,
  content: string | null,
  fileUsed: string,
  docsPath: string,
  docsBranch: string,
  env: Env,
)

Source from the content-addressed store, hash-verified

298}
299
300async function enqueueDocumentationProcessing(
301 owner: string,
302 repo: string,
303 content: string | null,
304 fileUsed: string,
305 docsPath: string,
306 docsBranch: string,
307 env: Env,
308) {
309 try {
310 if (env.MY_QUEUE) {
311 console.log("Enqueuing documentation processing", owner, repo);
312 const repoUrl = `https://github.com/${owner}/${repo}`;
313
314 // Prepare and send message to queue
315 const message = {
316 owner,
317 repo,
318 repo_url: repoUrl,
319 file_url: docsPath,
320 content_length: content?.length,
321 file_used: fileUsed,
322 docs_branch: docsBranch,
323 };
324
325 await env.MY_QUEUE.send(JSON.stringify(message));
326 console.log(
327 `Queued documentation processing for ${owner}/${repo}`,
328 message,
329 );
330 } else {
331 console.error("Queue 'MY_QUEUE' not available in environment");
332 }
333 } catch (error) {
334 console.error(
335 `Failed to enqueue documentation request for ${owner}/${repo}`,
336 error,
337 );
338 }
339}
340
341export async function searchRepositoryDocumentation({
342 repoData,

Callers 1

fetchDocumentationFunction · 0.85

Calls 3

logMethod · 0.80
errorMethod · 0.80
sendMethod · 0.65

Tested by

no test coverage detected