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

Function fetchRepo

scripts/repo-checks.mjs:55–70  ·  view source on GitHub ↗
(slug)

Source from the content-addressed store, hash-verified

53}
54
55async function fetchRepo(slug) {
56 const response = await fetch(`https://api.github.com/repos/${slug}`, {
57 headers: {
58 Accept: 'application/vnd.github+json',
59 'User-Agent': 'awesome-langgraph-repo-checks',
60 ...(GITHUB_TOKEN ? { Authorization: `Bearer ${GITHUB_TOKEN}` } : {}),
61 },
62 });
63
64 if (!response.ok) {
65 const body = await response.text();
66 throw new Error(`GitHub API request failed for ${slug}: ${response.status} ${response.statusText} ${body}`);
67 }
68
69 return response.json();
70}
71
72function classifyRepo(repo, cutoffDate, isCommunityRepo) {
73 const pushedAt = repo.pushed_at ? new Date(repo.pushed_at) : null;

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected