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.

包名
@royalsan/dsh-github-trending
兼容性
待验证
版本
1.0.0
许可证
MIT
最近更新
2026年10月30日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add https://github.com/Royalsan/dsh-github-trending/releases/latest/download/dsh-github-trending.tgz

配置

apply(ctx, config) 支持以下字段(均有默认值):

字段类型默认说明
tokenstring$GITHUB_TOKEN / $GH_TOKEN可选 GitHub token,用于提升 API 限额(未认证 60 次/小时)。不要把 token 写进仓库,用环境变量传入即可
defaultSincedaily|weekly|monthlydaily工具/命令未指定周期时使用
defaultLimitnumber15抓取条数(3–25)
defaultFocusnumber3深度融合解读的仓库数(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 页面本身的数据渲染。