| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
fix(repo): address Round 1 review — JSON empty value + ResolveRepo + test assertions Address Round 1 independent review findings (PR #493): P1 fixes (must fix): - Fix --view --json with empty default: move JSON branch before empty check so --json always outputs JSON (agent-friendly contract) - Add TestViewDefaultJSONEmpty to verify empty + JSON outputs {"default_repo":""} not plain text P2 fixes (should fix): - Replace hand-written repo inference with cmdutil.ResolveRepo, aligning with browse.go/view.go and 80+ commands pattern - Strengthen test assertions: json.Unmarshal for JSON tests, errors.As + ExitUsage(2) for error tests - Remove redundant ParseRepo error wrapping (return directly) Test count: 11 → 13, all passing. Refs gitcode-cli/cli#524 | 2 个月前 | |
fix(repo): address Round 1 review — JSON empty value + ResolveRepo + test assertions Address Round 1 independent review findings (PR #493): P1 fixes (must fix): - Fix --view --json with empty default: move JSON branch before empty check so --json always outputs JSON (agent-friendly contract) - Add TestViewDefaultJSONEmpty to verify empty + JSON outputs {"default_repo":""} not plain text P2 fixes (should fix): - Replace hand-written repo inference with cmdutil.ResolveRepo, aligning with browse.go/view.go and 80+ commands pattern - Strengthen test assertions: json.Unmarshal for JSON tests, errors.As + ExitUsage(2) for error tests - Remove redundant ParseRepo error wrapping (return directly) Test count: 11 → 13, all passing. Refs gitcode-cli/cli#524 | 2 个月前 |