| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
test(repo): cover archive --json + docs json list Refs #523 | 2 个月前 | |
fix(repo): address Round 1 review — secret scan + limit validation + json index Address Round 1 independent review findings (PR #496): Blocker fixes: - S1: Add cmdutil.ScanContentForSecrets for --description in branch create (security requirement, aligns with label/milestone/repo create) - D1: Add repo branch list to --json read-only commands index - D2: Add repo branch create to --json write-path commands index Should-fix: - C2: Add omitempty to CreateBranchRequest.Description json tag - C3: Add --limit/--page validation in branch list (aligns with actions/run/list pattern) 14/14 tests pass. Refs gitcode-cli/cli#534 | 2 个月前 | |
fix(repo): address Round 1 review — delete confirmation + remove no-op json + list empty json Address Round 1 independent review findings (PR #500): Blocker fixes: - S1: Add --yes flag + ConfirmOrAbort to delete command (aligns with all other delete commands: repo/label/release/milestone) - C2: Remove --json flag from create/update (was registered but never used, no JSON output path) - C3: Fix list empty+JSON to output [] instead of text message (agent-friendly contract: --json always outputs JSON) Doc fixes: - D2: Add exit code 2 and --yes to delete docs 15/15 tests pass. Refs gitcode-cli/cli#530 | 2 个月前 | |
fix(git): set GIT_TERMINAL_PROMPT=0 to prevent non-TTY block | 2 个月前 | |
fix(security): scan 12 additional inline --comment/--body/--description paths for secrets (#426) Follow-up to #424: same vulnerability class found in 12 more commands during review. Adds ScanContentForSecrets to inline flag paths that were passing content directly to API calls without scanning. Fixed paths: - issue close --comment - issue reopen --comment - pr close --comment - pr reopen --comment - pr reply --body - commit comments create --body - commit comments edit --body - milestone create --description - label create --description - repo create --description - repo sync --body - pr sync --body Each scan is placed at the start of the run function, before auth and any API call (fail-fast). System test (secret-scan.txtar) extended from 10 to 22 inline paths. Closes #426 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> | 3 个月前 | |
chore: fix end-of-file-fixer and gofmt issues exposed by LF normalization Apply end-of-file-fixer (newline at EOF) and gofmt formatting fixes to files that were previously masked by CRLF/LF line-ending noise. Closes #300 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> | 4 个月前 | |
fix(repo): address Round 1 review — re-read + dead code + lint + tests Address Round 1 independent review findings (PR #499): Blocker fixes: - C1: UpdateRepo now re-reads GetRepo after PATCH to return complete Repository object (same pattern as UpdateUser) - C2: Remove privateSet dead code field - C6: Fix lint issues (use escapedRepoPath, remove unused field) - T1: Add TestEditRunPublic (--public → private:false body assertion) - T2: Add TestEditRunExitCodes (exit code 2/4 assertions) Should-fix: - C3: Use escapedRepoPath instead of manual path construction - C4: Use result.FullName in confirmation message - D1: Add exit codes 3 (404) and 5 (409) to docs - T5: Use io.ReadAll instead of manual byte buffer - T3: Strengthen JSON assertion (verify default_branch) 11/11 tests pass (9 original + 2 new: public body + exit codes). Refs gitcode-cli/cli#522 | 2 个月前 | |
refactor: move config from internal/ to pkg/ to fix layering Move internal/config → pkg/config to resolve the layering violation where pkg/cmdutil (shared pkg/ layer) imported internal/config (private internal/ layer). The config package is used by 16 files across all command packages and is inherently a shared component. Change: update all import paths from internal/config to pkg/config. No logic changes — pure mechanical refactor. Fixes #351 Co-Authored-By: Claude <noreply@anthropic.com> | 4 个月前 | |
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 个月前 | |
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 个月前 | |
feat(repo): add gc repo pr-settings view/update — PR merge gate rules Add a new repo pr-settings command group with 2 subcommands: - view: display all 24 PR settings fields (merge gate, reviewers, squash, CLA, lite PR, etc.) via GET /pull_request_settings - update: update specific PR settings via PUT /pull_request_settings, supports --reviewers/--pipeline-required/--no-self-merge/ --force-merge/--delete-source-branch/--merge-method flags API additions in queries_prsettings.go: - PRSettings type (24 fields matching API response) - UpdatePRSettingsRequest with pointer types (*bool/*int) to distinguish 'not provided' from zero values - GetPRSettings and UpdatePRSettings functions (UpdatePRSettings re-reads via GET after PUT for complete object) 9 unit tests (4 view + 5 update) cover: flag validation, JSON output, human-readable output, success with re-read, no-fields error, error. Real command verification on infra-test/gctest1: pr-settings view returns merge_method=merge, reviewers=0, pipeline=False. Refs gitcode-cli/cli#532 | 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 个月前 | |
test+docs: address review feedback for BaseRepo PR - stats_test.go: add TestStatsRunUsesBaseRepoWhenRepoOmitted (ResolveRepo + parseRepo path) and TestStatsRunBaseRepoError (ExitUsage on BaseRepo err) - delete_test.go: add TestDeleteBaseRepoInjected (f.BaseRepo injection) - COMMANDS.md: restore release list/view + commit view + actions, add destructive-command auto-detection note | 3 个月前 | |
fix(security): scan 12 additional inline --comment/--body/--description paths for secrets (#426) Follow-up to #424: same vulnerability class found in 12 more commands during review. Adds ScanContentForSecrets to inline flag paths that were passing content directly to API calls without scanning. Fixed paths: - issue close --comment - issue reopen --comment - pr close --comment - pr reopen --comment - pr reply --body - commit comments create --body - commit comments edit --body - milestone create --description - label create --description - repo create --description - repo sync --body - pr sync --body Each scan is placed at the start of the run function, before auth and any API call (fail-fast). System test (secret-scan.txtar) extended from 10 to 22 inline paths. Closes #426 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> | 3 个月前 | |
fix: downgrade browser open failure to warning in non-TTY environments When --web flag is used in CI/agent (non-TTY) environments, browser.Open() failure no longer causes non-zero exit. The resource is already successfully fetched and displayed; browser open is a convenience feature. - In TTY mode: browser.Open() errors are returned as before (users can react) - In non-TTY mode: browser.Open() errors print a warning to stderr but return nil (exit 0), preventing false failure signals for agents Affected commands: pr view, issue view, repo view, milestone view, commit view, release view, pr create Closes #341 Co-Authored-By: Claude <noreply@anthropic.com> | 4 个月前 | |
feat(repo): add gc repo archive/unarchive commands Refs #523 | 2 个月前 |