1.0 KiB
1.0 KiB
User Statistics Shortcuts
Background
GitLink OpenAPI exposes user analytics endpoints, including activity, contribution heatmap, development capability, role distribution, and professional categories. gitlink-cli previously only exposed user +me and user +info.
What Changed
Extended the user shortcut group with read-only statistics commands:
user +activityuser +headmapuser +developuser +roleuser +major
The commands support --login, with fallback to --owner or /users/me. Range-based endpoints support --start-time and --end-time; heatmap supports --year.
OpenAPI Coverage
GET /users/{owner}/statistics/activityGET /users/{owner}/headmapsGET /users/{owner}/statistics/developGET /users/{owner}/statistics/roleGET /users/{owner}/statistics/major
Validation
git diff --check
GOPROXY=https://goproxy.cn,direct go test ./shortcuts/user ./shortcuts
go vet ./shortcuts/user ./shortcuts
go run . user --help
GOPROXY=https://goproxy.cn,direct go test ./...
go vet ./...