logo
0
0
WeChat Login
✨ feat: 初始化 cli-dogfood dogfood 测试仓库

cli-dogfood

cnb-rs CLI 端到端 dogfood 测试目标仓库。

本仓库的全部初始内容(这份 README 之外的 .gitignoreLICENSE)都由 cnb-rs 自己生成 + 推送,形成闭环验证:

# 1. 用 cnb-rs 建仓库
cnb-rs repo create cli-dogfood --group wwvo/cnb-rs --license MIT \
  --description "cnb-rs CLI dogfood test repo - end-to-end test target"

# 2. clone 下来
cnb-rs repo clone wwvo/cnb-rs/cli-dogfood
cd cli-dogfood

# 3. 用 cnb-rs gitignore / license 模板填充
cnb-rs repo gitignore view Rust > .gitignore
cnb-rs repo license view MIT > LICENSE

# 4. 提交
git add -A && git commit -m "init" && git push

已 dogfood 过的命令

下表反映本仓库存活期间被 cnb-rs repo 命令组覆盖到的端点,验证位面包括:build 编译、命令 happy path、空数据兜底、--json 输出形态、type=empty / null body 等边缘 case。

写型操作

命令状态备注
create建立本仓库
edit --description/--site/--topics改字段、合并 topics
archive / unarchive200 + 空 body 路径
set-default / --unset / --viewgit config cnb.defaultRepo

读型操作

命令状态备注
view(含 --json表格 + JSON 两种形态
list --search搜出本仓库
clone空仓库提示友好
contributor / fork空场景友好提示
top-contributorsCNB 返回 null body 已兜底为 []
asset list同上 null body 兜底
security完整扫描类型表格
gitignore {list,view}模板源 wwvo/cnb-rs/gitignore-templates
license {list,view}模板源 wwvo/cnb-rs/license-templates
license list --featured.metadata.json 过滤
pin list / settings branch-protection list
settings {pipeline,pull-request,push-limit} get

dogfood 期间发现并修复

Bug影响范围修复定位
空 body 时 resp.json::<T>()error decoding response body(被包装为 Network 错误)archive / unarchive / edit 等修改类 endpointcrates/cnb-api/src/client/mod.rs::handle_response
CNB 在无数据场景返回字面量 null 而非 [] / {},集合类型 deserialize 失败top-contributors / asset list / create同上文件 null → [] / {} 兜底链

关联仓库

License

MIT — see LICENSE.