cnb-rs CLI 端到端 dogfood 测试目标仓库。
本仓库的全部初始内容(这份 README 之外的 .gitignore 与 LICENSE)都由 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
下表反映本仓库存活期间被 cnb-rs repo 命令组覆盖到的端点,验证位面包括:build 编译、命令 happy path、空数据兜底、--json 输出形态、type=empty / null body 等边缘 case。
| 命令 | 状态 | 备注 |
|---|---|---|
create | ✓ | 建立本仓库 |
edit --description/--site/--topics | ✓ | 改字段、合并 topics |
archive / unarchive | ✓ | 200 + 空 body 路径 |
set-default / --unset / --view | ✓ | 写 git config cnb.defaultRepo |
| 命令 | 状态 | 备注 |
|---|---|---|
view(含 --json) | ✓ | 表格 + JSON 两种形态 |
list --search | ✓ | 搜出本仓库 |
clone | ✓ | 空仓库提示友好 |
contributor / fork | ✓ | 空场景友好提示 |
top-contributors | ✓ | CNB 返回 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 | ✓ |
| Bug | 影响范围 | 修复定位 |
|---|---|---|
空 body 时 resp.json::<T>() 报 error decoding response body(被包装为 Network 错误) | archive / unarchive / edit 等修改类 endpoint | crates/cnb-api/src/client/mod.rs::handle_response |
CNB 在无数据场景返回字面量 null 而非 [] / {},集合类型 deserialize 失败 | top-contributors / asset list / create 等 | 同上文件 null → [] / {} 兜底链 |
wwvo/cnb-rs/cnb-rs — cnb-rs CLI 主仓库wwvo/cnb-rs/gitignore-templates — repo gitignore 数据源wwvo/cnb-rs/license-templates — repo license 数据源MIT — see LICENSE.