github/repo
githubRead-only获取 GitHub 仓库信息
github.com
Last 7 days
0
Last 30 days
0
All time
0
github/repo.js
/* @meta
{
"name": "github/repo",
"description": "获取 GitHub 仓库信息",
"domain": "github.com",
"args": {
"repo": {"required": true, "description": "owner/repo format (e.g. vaayne/tap)"}
},
"capabilities": ["network"],
"readOnly": true,
"example": "tap site github/repo vaayne/tap"
}
*/
async function(args) {
if (!args.repo) return {error: 'Missing argument: repo', hint: 'Use owner/repo format'};
const resp = await fetch('https://api.github.com/repos/' + args.repo, {credentials: 'include'});
if (!resp.ok) return {error: 'HTTP ' + resp.status, hint: resp.status === 404 ? 'Repo not found: ' + args.repo : 'API error'};
const d = await resp.json();
return {
full_name: d.full_name, description: d.description, language: d.language,
url: d.html_url || ('https://github.com/' + d.full_name),
stars: d.stargazers_count, forks: d.forks_count, open_issues: d.open_issues_count,
created_at: d.created_at, updated_at: d.updated_at, default_branch: d.default_branch,
topics: d.topics, license: d.license?.spdx_id
};
}
Updated Mar 31, 2026Created Mar 31, 2026SHA-256: dfeac4fe1c08…