| Files | Last commit | Last update |
|---|---|---|
feat(user): add gc user view and edit commands Add a new top-level user command group: - user view: view current user (GET /user) or a specific user (GET /users/{username}), with --json support - user edit: update current user profile (PATCH /user) with --name/--bio/--email/--company/--location/--website flags, includes ScanContentForSecrets for --bio API additions in queries_user.go: - UpdateUserRequest type with omitempty tags - UpdateUser function (PATCH /user) - User struct extended with bio/blog/company/followers/following/type 12 unit tests (6 view + 6 edit) cover: flags validation, current user view, username view path, JSON output, error handling, edit success, edit JSON, no-fields error, edit error. Real command verification: gc user view shows full profile (login, name, type, email, profile URL, avatar, followers/following). Refs gitcode-cli/cli#540 | 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 |