fix/about-contributors
main
关于页的「开发者」取自 Gitea 的 /collaborators,这个接口有两个问题:
/collaborators
GC/src/Services/ContributorsService.cs 改为读 /commits 分页统计(每页 50,最多 12 页),按作者归并:
GC/src/Services/ContributorsService.cs
/commits
Morris
Morris_1
2509_92447106
chenmoyuan1214@qq.com
morris@xhmcl.com
agent@teamily.ai
GC-UI/frontend:关于页「开发者」标题右侧标注「来自仓库提交记录」,i18n 补中英文案。
GC-UI/frontend
i18n
GitCode 的 contributors 实现保留,仅当仓库地址确实指向 gitcode.com 时才走。
本地实测(net8 编译 + 真实接口):
count=1 Morris | 32 | chenmoyuan1214@qq.com | https://git.xhmcl.com/avatars/95cfbf...
仓库共 33 条提交,其中 1 条为自动化账号,归并后为 Morris 32 次。
dotnet build GC/src/GC.Core.csproj
dotnet build GC-UI/backend/GC.UI.Server/GC.UI.Server.csproj
dart format --output=none lib
- ContributorsService 改用 /commits 分页统计,不再依赖需要登录的 /collaborators - 同一人的多个 git 身份按别名归并(Morris_1 / 2509_92447106 / 两个邮箱) - 自动化提交(agent@teamily.ai)不计入开发者,避免出现在关于页 - 关于页「开发者」标题标注数据来源,贡献数为真实提交数 - 结果缓存 10 分钟;接口失败时静默降级为空列表,不影响关于页其它内容
No dependencies set.
The note is not visible to the blocked user.
问题
关于页的「开发者」取自 Gitea 的
/collaborators,这个接口有两个问题:改动
GC/src/Services/ContributorsService.cs改为读/commits分页统计(每页 50,最多 12 页),按作者归并:Morris/Morris_1/2509_92447106/chenmoyuan1214@qq.com/morris@xhmcl.com→Morris。agent@teamily.ai这类 CI / 助手提交不计入开发者。GC-UI/frontend:关于页「开发者」标题右侧标注「来自仓库提交记录」,i18n补中英文案。GitCode 的 contributors 实现保留,仅当仓库地址确实指向 gitcode.com 时才走。
验证
本地实测(net8 编译 + 真实接口):
仓库共 33 条提交,其中 1 条为自动化账号,归并后为 Morris 32 次。
dotnet build GC/src/GC.Core.csproj→ 0 warning / 0 errordotnet build GC-UI/backend/GC.UI.Server/GC.UI.Server.csproj→ 成功(2 个既有 CA1416 警告,与本次改动无关)dart format --output=none lib→ 7 个文件语法正常