| Files | Last commit | Last update |
|---|---|---|
docs(actions): clarify full commit SHA filter Refs #512 | 2 months ago | |
perf(api): stream --input file/stdin as request body (align with gh) - readInput now returns *os.File for file input and io.NopCloser(stdin) for stdin, instead of buffering the entire content into memory via os.ReadFile/bytes.NewReader. - run() defers Close on the returned reader when it implements io.Closer. - Mirrors GitHub CLI's openUserFile (pkg/cmd/api/api.go) which streams the file directly as the HTTP request body. - Add tests: TestReadInputEmptyReturnsNil, TestReadInputStreamsFile. | 3 months ago | |
feat(auth): disclose git-credential follow-up limitation in setup-git Refs #529 | 2 months ago | |
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 months ago | |
fix(cmdutil): SetFlagEnum returns error, no panic + spec rule (#415) #415: SetFlagEnum 在注解失败时 panic 让 CLI 崩溃,绕过 error 语义。spec 此前 无「禁止裸 panic」规则(issue 引用条文不存在),先补规则再修: - spec/foundations/coding-standards.md: 错误处理节加「禁止裸 panic」规则 (业务/运行期 error 返回;构造期非功能性元数据无法传播 error 时降级 stderr 告警+继续,不得崩溃;Must* 前缀显式 fail-fast;cobra 第三方不在范围) - pkg/cmdutil/flag_annotations.go: SetFlagEnum 改返 error(去 panic); 新增 SetFlagEnumOrWarn(构造期降级告警+继续,不崩溃) - pkg/cmdutil/format.go: AddFormatFlag/AddTimeFormatFlag 同包调用改 OrWarn - 18 处命令构造调用点 cmdutil.SetFlagEnum( → cmdutil.SetFlagEnumOrWarn( - pkg/cmdutil/flag_annotations_test.go: 新增 4 测试(注册 flag 注解成功; 未注册 flag 返 error 不 panic;OrWarn 不崩溃+stderr 告警;OrWarn 成功静默) 正确代码行为不变(注解照常设置);仅编程错误(注解未注册 flag)时从崩溃改为告警。 Closes #415 | 2 months ago | |
fix(config): address Round 1 review — clear-cache help + editor/pager defaults + docs Address Round 1 independent review findings (PR #494): P1 fixes (must fix): - D2: Fix clear-cache Long help text — remove references to non-existent cache types (API responses/completion scripts/update timestamps); state honestly what it clears - D1: Add config list to --json supported commands list in COMMANDS.md P2 fixes (should fix): - C5: Show editor=vim and pager=less as default values in config list, matching Config.Editor()/Config.Pager() behavior - D3: Add default_repo to config get/set supported keys in docs - D4: Add GC_CONFIG_DIR mention to config clear-cache docs 16/16 tests pass. Refs gitcode-cli/cli#527 | 2 months ago | |
feat(cli): 统一 list 命令分页 flag(--limit + --per-page 全覆盖) issue #501:list 类命令分页 flag 命名分裂——issue/label/milestone/ repo list/repo log 仅 --limit;discussions(org+project) 仅 --per-page; pr list/actions 两者并存。agent 无法预知某命令用哪个 flag(§6.1)。 方案 A:所有 list 命令统一提供 --per-page(API page size)+ --limit (客户端结果上限,默认 30)。语义对齐 pr list 既有双 flag 模式 (resolvePerPage + trim + LimitSet/PerPageSet)。 改动: - issue/label/milestone/repo list/repo log(5 命令)补 --per-page + resolvePerPage/trim + PerPage<0 校验 - discussions list(org) + project list(2 命令)补 --limit + trim + Limit<=0 校验 - pr list / actions(已合规)不改 - docs/COMMANDS.md 更新 7 命令分页 flag 说明(修正 label list 旧误述) - 单测:issue list 补 resolvePerPage/trim/validation 表驱动测试; discussions org+project 修 fixture(Limit:30) + 补 limit 校验用例 §5.9.B:已查 gc-api-doc 确认 issues/labels/milestones 端点均支持 per_page(无功能缺口,仅 flag 命名分裂)。 Closes #501 | 2 months ago | |
fix(update): make npm updates explicit and transactional | 2 months ago | |
fix(cmdutil): SetFlagEnum returns error, no panic + spec rule (#415) #415: SetFlagEnum 在注解失败时 panic 让 CLI 崩溃,绕过 error 语义。spec 此前 无「禁止裸 panic」规则(issue 引用条文不存在),先补规则再修: - spec/foundations/coding-standards.md: 错误处理节加「禁止裸 panic」规则 (业务/运行期 error 返回;构造期非功能性元数据无法传播 error 时降级 stderr 告警+继续,不得崩溃;Must* 前缀显式 fail-fast;cobra 第三方不在范围) - pkg/cmdutil/flag_annotations.go: SetFlagEnum 改返 error(去 panic); 新增 SetFlagEnumOrWarn(构造期降级告警+继续,不崩溃) - pkg/cmdutil/format.go: AddFormatFlag/AddTimeFormatFlag 同包调用改 OrWarn - 18 处命令构造调用点 cmdutil.SetFlagEnum( → cmdutil.SetFlagEnumOrWarn( - pkg/cmdutil/flag_annotations_test.go: 新增 4 测试(注册 flag 注解成功; 未注册 flag 返 error 不 panic;OrWarn 不崩溃+stderr 告警;OrWarn 成功静默) 正确代码行为不变(注解照常设置);仅编程错误(注解未注册 flag)时从崩溃改为告警。 Closes #415 | 2 months ago | |
feat(cli): 统一 list 命令分页 flag(--limit + --per-page 全覆盖) issue #501:list 类命令分页 flag 命名分裂——issue/label/milestone/ repo list/repo log 仅 --limit;discussions(org+project) 仅 --per-page; pr list/actions 两者并存。agent 无法预知某命令用哪个 flag(§6.1)。 方案 A:所有 list 命令统一提供 --per-page(API page size)+ --limit (客户端结果上限,默认 30)。语义对齐 pr list 既有双 flag 模式 (resolvePerPage + trim + LimitSet/PerPageSet)。 改动: - issue/label/milestone/repo list/repo log(5 命令)补 --per-page + resolvePerPage/trim + PerPage<0 校验 - discussions list(org) + project list(2 命令)补 --limit + trim + Limit<=0 校验 - pr list / actions(已合规)不改 - docs/COMMANDS.md 更新 7 命令分页 flag 说明(修正 label list 旧误述) - 单测:issue list 补 resolvePerPage/trim/validation 表驱动测试; discussions org+project 修 fixture(Limit:30) + 补 limit 校验用例 §5.9.B:已查 gc-api-doc 确认 issues/labels/milestones 端点均支持 per_page(无功能缺口,仅 flag 命名分裂)。 Closes #501 | 2 months ago | |
fix(label): set GC_TOKEN in edit tests + fix --json list category Refs #525 | 2 months ago | |
test(lark): cross-platform stubs for CI (fix #499) lark 测试硬编码 /bin/true 作 FindLarkCLI 桩,该路径仅 Linux 存在,导致 macOS/Windows CI 报 lark-cli not installed(4 测试跨平台失败,main HEAD 既有)。改用 os.Executable() (运行中的测试二进制,全平台存在且 isExecutable 通过)。另 TestSaveDefaultChat 的 0600 权限断言 Windows-only 失败(Go 在 Windows 报 0666),改为 unix-only 断言。 - doctor_test.go/install_test.go: /bin/true → existingExecutable(t) (os.Executable) - config_test.go: 0600 断言 runtime.GOOS != windows 时才校验 | 2 months ago | |
feat(cli): 统一 list 命令分页 flag(--limit + --per-page 全覆盖) issue #501:list 类命令分页 flag 命名分裂——issue/label/milestone/ repo list/repo log 仅 --limit;discussions(org+project) 仅 --per-page; pr list/actions 两者并存。agent 无法预知某命令用哪个 flag(§6.1)。 方案 A:所有 list 命令统一提供 --per-page(API page size)+ --limit (客户端结果上限,默认 30)。语义对齐 pr list 既有双 flag 模式 (resolvePerPage + trim + LimitSet/PerPageSet)。 改动: - issue/label/milestone/repo list/repo log(5 命令)补 --per-page + resolvePerPage/trim + PerPage<0 校验 - discussions list(org) + project list(2 命令)补 --limit + trim + Limit<=0 校验 - pr list / actions(已合规)不改 - docs/COMMANDS.md 更新 7 命令分页 flag 说明(修正 label list 旧误述) - 单测:issue list 补 resolvePerPage/trim/validation 表驱动测试; discussions org+project 修 fixture(Limit:30) + 补 limit 校验用例 §5.9.B:已查 gc-api-doc 确认 issues/labels/milestones 端点均支持 per_page(无功能缺口,仅 flag 命名分裂)。 Closes #501 | 2 months ago | |
fix(pr): address Round 1 review — string body + query params + tests Address Round 1 independent review findings (PR #502): Blocker fixes: - C1: Change AssigneeRequest/ReviewerRequest/TesterRequest from []string to string (comma-separated) to match api-doc schema (type: string, not array) - C2: RemovePRAssignees now uses query parameter (?assignees=u1,u2) instead of request body (api-doc says DELETE assignees has no standard request body definition) - C3: Add omitempty to ReviewerRequest.Add and TesterRequest.Add to prevent remove path from sending add:false - T1: Add TestEditRunAddAssignee, TestEditRunAddReviewerAndTester, TestEditRunRemoveAssignee (verify POST/DELETE methods called) - T2: Add TestHasAssigneeChanges (4 scenarios) 13/13 tests pass. Refs gitcode-cli/cli#541 | 2 months ago | |
fix(precommit): enforce pre-push hooks | 3 months ago | |
fix(release): WrapNotFound + help asset-id source Refs #528 | 2 months ago | |
test(repo): cover archive --json + docs json list Refs #523 | 2 months ago | |
feat: add SSH key management commands | 2 months ago | |
fix(cmdutil): SetFlagEnum returns error, no panic + spec rule (#415) #415: SetFlagEnum 在注解失败时 panic 让 CLI 崩溃,绕过 error 语义。spec 此前 无「禁止裸 panic」规则(issue 引用条文不存在),先补规则再修: - spec/foundations/coding-standards.md: 错误处理节加「禁止裸 panic」规则 (业务/运行期 error 返回;构造期非功能性元数据无法传播 error 时降级 stderr 告警+继续,不得崩溃;Must* 前缀显式 fail-fast;cobra 第三方不在范围) - pkg/cmdutil/flag_annotations.go: SetFlagEnum 改返 error(去 panic); 新增 SetFlagEnumOrWarn(构造期降级告警+继续,不崩溃) - pkg/cmdutil/format.go: AddFormatFlag/AddTimeFormatFlag 同包调用改 OrWarn - 18 处命令构造调用点 cmdutil.SetFlagEnum( → cmdutil.SetFlagEnumOrWarn( - pkg/cmdutil/flag_annotations_test.go: 新增 4 测试(注册 flag 注解成功; 未注册 flag 返 error 不 panic;OrWarn 不崩溃+stderr 告警;OrWarn 成功静默) 正确代码行为不变(注解照常设置);仅编程错误(注解未注册 flag)时从崩溃改为告警。 Closes #415 | 2 months ago | |
fix(search): address Round 1 review — refactor SearchIssues + limit validation + types Address Round 1 independent review findings (PR #498): Blocker fixes: - C3: Refactor SearchIssues to take Repo/State in SearchOptions struct instead of separate parameters, eliminating manual URL &-concatenation edge case (buildSearchQuery handles all params via queryBuilder.Set) - C1: SearchIssueResult.Number changed from interface{} to FlexibleNumber (aligns with existing Issue.Number type) - D1: Add --limit/--page to search issues docs (was missing) Should-fix: - C4: Add --limit/--page validation to all three subcommands (aligns with repo branch list pattern) - C5: SearchRepoResult.Status changed from interface{} to string (api-doc confirms it is always string) - D2: Add exit code 2 (parameter error) to all three search docs 14/14 tests pass. Refs gitcode-cli/cli#518 | 2 months ago | |
Revert "fix: validate SSH public key wire format" This reverts commit 63c1e78ca4b0cdb348a9bc514d23b9613b17c0ca. | 2 months ago | |
feat(install): unify diagnostics and automatic npm updates Refs #505 | 2 months ago | |
fix(user): address Round 1 review — re-read after update + json index + secret test Address Round 1 independent review findings (PR #497): Blocker fixes: - C1: UpdateUser now re-reads CurrentUser after PATCH to return complete User object (PATCH response uses nickname/description while User struct uses name/bio; re-reading via GET /user gets the full canonical object) - D1: Add user view to --json read-only commands index - D1: Add user edit to --json write-path commands index - T2/S2: Add TestEditRunSecretScanRejection test (verifies secret in --bio is rejected before HTTP request is made) Doc fixes: - D2/D3: Add ExitAuth(4) to user view and user edit exit codes 13/13 tests pass (12 original + 1 secret scan rejection). Refs gitcode-cli/cli#540 | 2 months ago | |
test(version): address review findings | 3 months ago |
| Files | Last commit | Last update |
|---|---|---|
| 2 months ago | ||
| 3 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 3 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 3 months ago |