feat(user): add SSH key shortcuts #73

Closed
Mengz wants to merge 0 commits from Mengz/gitlink-cli:mengz/user-key-shortcuts into master
Contributor

Summary

Add account-level SSH public key shortcuts under the existing user command group:

  • user +keys lists current user public keys with pagination.
  • user +add-key creates a key from inline --key content or a public key file via --from.
  • user +delete-key deletes a key by positive integer ID.

Why

This fills an OpenAPI coverage gap for /public_keys and does not overlap with current open PRs, which cover templates, repo settings/topics, pipeline, release updates, user account/stats, wiki, dataset, code, issue metadata, notifications, reactions, tags, and repo units.

Quality

  • Validates key source ambiguity before write requests.
  • Validates public key prefix before creation.
  • Validates delete ID as a positive integer to avoid ambiguous path construction.
  • Supports file-based public key input for normal SSH workflows.

Docs

Updated README examples, Chinese README examples, skills index, gitlink-user Skill guidance, and added doc/changes/user-key-shortcuts.md.

Tests

  • go test ./shortcuts/user/...
  • go test ./shortcuts/...
  • go test ./...
  • go build ./...
  • go run . user +keys --help
  • go run . user +add-key --help
  • go run . user +delete-key --help
  • git diff --check
## Summary Add account-level SSH public key shortcuts under the existing `user` command group: - `user +keys` lists current user public keys with pagination. - `user +add-key` creates a key from inline `--key` content or a public key file via `--from`. - `user +delete-key` deletes a key by positive integer ID. ## Why This fills an OpenAPI coverage gap for `/public_keys` and does not overlap with current open PRs, which cover templates, repo settings/topics, pipeline, release updates, user account/stats, wiki, dataset, code, issue metadata, notifications, reactions, tags, and repo units. ## Quality - Validates key source ambiguity before write requests. - Validates public key prefix before creation. - Validates delete ID as a positive integer to avoid ambiguous path construction. - Supports file-based public key input for normal SSH workflows. ## Docs Updated README examples, Chinese README examples, skills index, `gitlink-user` Skill guidance, and added `doc/changes/user-key-shortcuts.md`. ## Tests - `go test ./shortcuts/user/...` - `go test ./shortcuts/...` - `go test ./...` - `go build ./...` - `go run . user +keys --help` - `go run . user +add-key --help` - `go run . user +delete-key --help` - `git diff --check`
Mengz force-pushed mengz/user-key-shortcuts from 9453f7bd7b to 07aa5d2a78 2026-06-09 12:04:27 +08:00 Compare
Mengz force-pushed mengz/user-key-shortcuts from 07aa5d2a78 to 37e736c4d8 2026-07-04 09:08:07 +08:00 Compare
wbtiger closed this pull request 2026-07-14 23:00:31 +08:00
wbtiger reopened this pull request 2026-07-14 23:03:19 +08:00
wbtiger closed this pull request 2026-07-14 23:08:34 +08:00

Pull request closed

Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Gitlink/gitlink-cli#73
No description provided.