| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
fix(browse): respect --no-interactive, add url.PathEscape, fix error wrapping Address Round 1 independent review findings (PR #489): P1 fixes (must fix): - Add opts.IO.NoInteractive() check so --no-interactive suppresses browser opening in TTY mode (agent-friendly CLI contract §6.1) - This aligns code with docs/COMMANDS.md which already documents --no-interactive as suppressing browser P2 fixes (should fix): - Add url.PathEscape for owner/repo/commit path segments, aligning with api/repo_path.go security convention - Normalize api.gitcode.com → gitcode.com in resolveHost to avoid opening API host in browser - Wrap resolveHost error with fmt.Errorf("failed to resolve host: %w") - Add 5 new tests: resolveHost error path, API host normalization, --no-interactive browser suppression, invalid repo format Test count: 20 → 25, all passing. Refs gitcode-cli/cli#521 | 2 个月前 | |
fix(browse): respect --no-interactive, add url.PathEscape, fix error wrapping Address Round 1 independent review findings (PR #489): P1 fixes (must fix): - Add opts.IO.NoInteractive() check so --no-interactive suppresses browser opening in TTY mode (agent-friendly CLI contract §6.1) - This aligns code with docs/COMMANDS.md which already documents --no-interactive as suppressing browser P2 fixes (should fix): - Add url.PathEscape for owner/repo/commit path segments, aligning with api/repo_path.go security convention - Normalize api.gitcode.com → gitcode.com in resolveHost to avoid opening API host in browser - Wrap resolveHost error with fmt.Errorf("failed to resolve host: %w") - Add 5 new tests: resolveHost error path, API host normalization, --no-interactive browser suppression, invalid repo format Test count: 20 → 25, all passing. Refs gitcode-cli/cli#521 | 2 个月前 |