Commit Graph

3 Commits

Author SHA1 Message Date
刘焱 68e7994d08 docs(commit): 子命令描述和注释中文化 2026-06-08 19:58:17 +08:00
s2_cc 9f479a27db feat: optimize existing commands (P1-P4)
P1 Bug fixes:
- Fix issue +create --label not being sent to API
- Replace hardcoded "master" default branch with dynamic API query
- Add GetDefaultBranch() helper (common/types.go)

P2 Complete missing command parameters (10 items, 39 new flags):
- issue +list: --milestone, --assignee, --label, --keyword, --sort, --sort-direction
- issue +update: --milestone, --assignee, --label, --priority (expanded validation)
- issue +close: --comment (post journal on close)
- pr +list: --keyword, --milestone, --tag, --reviewer, --assignee, --sort, --sort-direction
- pr +create: --priority, --assignee, --milestone, --label (multi-label support)
- pr +merge: validate --method values, add --title, --body
- ci +builds: --status, --branch, --event, --since, --until
- search +repos: --language, --sort, --order
- search +users: --sort, --order
- release +list: --prerelease-only, --latest (client-side filtering)

P3 Batch operations (9 new commands with generic batch framework):
- Add common/batch.go: BatchSummary, CollectNumbers, ProcessBatch, CSV parsing
- Add common/confirm.go: ConfirmAction with --yes skip
- issue +batch-update: native batch_update API with ID mapping
- issue +batch-destroy: native batch_destroy API
- Refactor issue +batch-close to use common batch utilities
- pr +batch-close, pr +batch-merge
- collaborator +batch-add, +batch-remove, +batch-role
- branch +batch-delete, +batch-protect

P4 Help docs, confirm prompts, and error messages:
- Add Long description and Example to all 18 command groups
- Add confirmation prompt to destructive operations (repo/branch/release delete, ci stop)
- Improve HTTP error messages with contextual hints (401/403/404/422/500)
- Replace hardcoded Chinese strings with English in release +delete
2026-06-04 10:45:32 +08:00
刘焱 b64a5104a8 feat: improve cross-platform compatibility and expand API shortcut coverage
Cross-platform improvements:
- Config/credential paths now use platform-aware directories:
  Windows (%APPDATA%), macOS (~/Library/Application Support),
  Linux (XDG_CONFIG_HOME) instead of hardcoded ~/.config
- npm install script: add retry (3x), HTTP proxy support (HTTP_PROXY/HTTPS_PROXY),
  download progress indicator, Windows tar fallback extraction
- Makefile: add cross-build (6 platforms), checksums (SHA256), lint targets
- Release workflow: auto-detect Go version from go.mod, upload SHA256 checksums

New API shortcut groups (36 sub-commands across 7 domains):
- collaborator: +list, +add, +remove, +change-role
- tag: +list, +view, +delete
- milestone: +list, +create, +view, +update, +delete, +close
- file: +get, +readme, +create, +update, +delete, +tree, +blob
- commit: +list, +view, +diff, +blame, +compare
- label: +list, +create, +update, +delete, +priorities, +statuses, +authors, +assigners
- sshkey: +list, +create, +delete

Total shortcut commands increased from ~50 to ~86 (+72% coverage).
2026-05-28 15:11:25 +08:00