环境
- 使用 RikkaHub 内置的 GitHub 工具进行功能测试
- 测试账号:
heikeyangle-code
- 测试仓库:
rikkahub-plus-fresh
问题列表
一、JSON 序列化 Bug(3个)
1. search_code — JsonObject is not a JsonPrimitive
- 调用
search_code 搜索代码时抛出异常
- 原因:搜索结果的某些字段是嵌套 JSON 对象,但代码中直接当作
JsonPrimitive 解析
- 堆栈:
kotlinx.serialization.json.JsonElementKt.getJsonPrimitive
2. get_commit — 同上
- 调用
get_commit(sha=master) 时抛出同样的异常
- commit 对象中的复杂字段解析失败
3. list_collaborators — 'all' is not valid
- 调用时固定传参
permission=all,但 GitHub API 不接受该值
- 支持的值为:
pull, triage, push, maintain, admin
- 应默认不传 permission 参数,或者传
pull
二、参数/逻辑 Bug(2个)
4. search_commits — 缺少搜索关键词报错
- 仅使用 qualifier 搜索(如
repo:owner/name)会直接返回 422 错误
- GitHub API 要求必须提供搜索文本关键词
5. trending — 始终返回 total=0
- 无论是否指定
language 和 since 参数,结果始终为 {"total":0,"results":[]}
三、列表数据为空(4个)
6. list_commits — 返回空列表
- 仓库实际有大量代码(~90MB),但提交历史完全读不到
7. list_branches — 返回空列表
8. list_files — 返回空列表
- 默认使用
main 作为分支名请求(但仓库默认分支是 master)
- 即使指定
branch=master 仍然返回空
- 但
read_file 和 file_meta 可以正常读取文件内容
9. ci_status — total 正常但 results 为空
- 能正确统计运行次数(total=492),但 results 数组为空
- 导致无法获取具体的 run_id、状态、时间等信息
- 进而导致所有 CI 相关功能无法使用(
ci_log, ci_jobs, ci_artifacts, ci_cancel, rerun_workflow 等都需要 run_id)
预期行为
以上功能应能正确返回数据,而非抛出异常或返回空列表。
截图/日志
(如有需要可补充具体堆栈信息)
环境
heikeyangle-coderikkahub-plus-fresh问题列表
一、JSON 序列化 Bug(3个)
1.
search_code— JsonObject is not a JsonPrimitivesearch_code搜索代码时抛出异常JsonPrimitive解析kotlinx.serialization.json.JsonElementKt.getJsonPrimitive2.
get_commit— 同上get_commit(sha=master)时抛出同样的异常3.
list_collaborators— 'all' is not validpermission=all,但 GitHub API 不接受该值pull,triage,push,maintain,adminpull二、参数/逻辑 Bug(2个)
4.
search_commits— 缺少搜索关键词报错repo:owner/name)会直接返回 422 错误5.
trending— 始终返回 total=0language和since参数,结果始终为{"total":0,"results":[]}三、列表数据为空(4个)
6.
list_commits— 返回空列表7.
list_branches— 返回空列表8.
list_files— 返回空列表main作为分支名请求(但仓库默认分支是master)branch=master仍然返回空read_file和file_meta可以正常读取文件内容9.
ci_status— total 正常但 results 为空ci_log,ci_jobs,ci_artifacts,ci_cancel,rerun_workflow等都需要 run_id)预期行为
以上功能应能正确返回数据,而非抛出异常或返回空列表。
截图/日志
(如有需要可补充具体堆栈信息)