| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
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 个月前 | |
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 个月前 | |
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 个月前 | |
feat(search): add gc search repos/issues/users — new top-level command Add a new search top-level command with three subcommands: - search repos: search repositories by keyword (GET /search/repositories) - search issues: search issues by keyword, with --repo and --state filters (GET /search/issues) - search users: search users by keyword (GET /search/users) All three support --json, --limit, --page flags. API additions in queries_search.go: - SearchRepoResult and SearchIssueResult types (using interface{} for fields that can be objects: id, namespace, status, repository, number) - SearchOptions type for common query parameters - SearchRepos, SearchIssues, SearchUsers functions - Reuses existing User type for search users results 14 unit tests (5 repos + 4 issues + 5 users) cover: flag validation, JSON output, human-readable output, empty results, error handling. Real command verification: - search repos "gitcode": 3 results (full_name + description) - search users "dev": 3 results (login + name) - search issues "bug": 3 results (number + state + title) Refs gitcode-cli/cli#518 | 2 个月前 |