MCPcopy
hub / github.com/vonzosten/awesome-LangGraph / parseGitHubRepos

Function parseGitHubRepos

scripts/repo-checks.mjs:23–42  ·  view source on GitHub ↗
(markdown)

Source from the content-addressed store, hash-verified

21}
22
23function parseGitHubRepos(markdown) {
24 const regex = /\(https:\/\/github\.com\/([^\s/)]+)\/([^\s/)]+)(?:\/[^)]*)?\)/g;
25 const repos = new Map();
26
27 for (const match of markdown.matchAll(regex)) {
28 const { owner, repo } = normalizeRepo(match[1], match[2]);
29 const slug = `${owner}/${repo}`;
30
31 if (!repos.has(slug)) {
32 repos.set(slug, {
33 owner,
34 repo,
35 slug,
36 url: `https://github.com/${slug}`,
37 });
38 }
39 }
40
41 return repos;
42}
43
44function extractCommunitySection(readme) {
45 const start = readme.indexOf(COMMUNITY_HEADER);

Callers 1

mainFunction · 0.85

Calls 1

normalizeRepoFunction · 0.85

Tested by

no test coverage detected