MCPcopy Index your code
hub / github.com/FirefoxCSS-Store/FirefoxCSS-Store.github.io / readCodeberg

Function readCodeberg

scripts/repository-stats.mjs:79–89  ·  view source on GitHub ↗
({ owner, name })

Source from the content-addressed store, hash-verified

77}
78
79async function readCodeberg({ owner, name }) {
80 const headers = codebergToken ? { Authorization: `token ${codebergToken}` } : {}
81 const data = await requestJson(`https://codeberg.org/api/v1/repos/${owner}/${name}`, headers)
82
83 return {
84 stars: data.stars_count ?? 0,
85 updatedAt: data.updated_at ?? null,
86 ownerAvatar: data.owner?.avatar_url ?? null,
87 accessible: true
88 }
89}

Callers 1

fetchRepositoryStatsFunction · 0.85

Calls 1

requestJsonFunction · 0.85

Tested by

no test coverage detected