Royalsan/dsh-github-trending ↗★ 1
@royalsan/dsh-github-trending
GitHub Trending radar: fetch daily/weekly/monthly boards, analyze every repository, and render an interactive card report inside the Harness Web UI.
Install
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add https://github.com/Royalsan/dsh-github-trending/releases/latest/download/dsh-github-trending.tgzREADME
Read the full README ↗配置
apply(ctx, config) 支持以下字段(均有默认值):
| 字段 | 类型 | 默认 | 说明 |
|---|---|---|---|
token | string | $GITHUB_TOKEN / $GH_TOKEN | 可选 GitHub token,用于提升 API 限额(未认证 60 次/小时)。不要把 token 写进仓库,用环境变量传入即可 |
defaultSince | daily|weekly|monthly | daily | 工具/命令未指定周期时使用 |
defaultLimit | number | 15 | 抓取条数(3–25) |
defaultFocus | number | 3 | 深度融合解读的仓库数(1–6) |
在 cordis.yml / bundle patch 里写 config: 即可覆盖;token 建议留给环境变量。
使用
/github-trending # 今日榜,全语言
/github-trending weekly rust # 周榜,Rust
工具调用等价于:
{ "since": "weekly", "language": "rust", "limit": 20, "focus": 4, "refresh": false }
HTTP 路由(同源,供面板与外部脚本使用):
GET /dsh-github-trending/report?since=daily&language=&limit=15&focus=3&refresh=0
返回报告 JSON:since / language / generatedAt / repos[](含分析字段)/ summary / mermaid。
缓存:报告 10 分钟(同一周期的并发请求会合并),GitHub API 事实 6 小时;命中 403/429 后 5 分钟内跳过增强, 页面仍可用 Trending 页面本身的数据渲染。