1.1 KiB
1.1 KiB
Branch Lifecycle Shortcuts
Background
GitLink OpenAPI exposes branch lifecycle capabilities that were not fully reachable from gitlink-cli: keyword/state branch listing, no-pagination listing, default branch switching, and deleted branch restoration.
What Changed
Extended the branch shortcut group with documented OpenAPI coverage:
branch +list --keyword --statemaps toGET /api/v1/{owner}/{repo}/branches.jsonquery parameters.branch +allmaps toGET /api/v1/{owner}/{repo}/branches/all.json.branch +set-default --namemaps toPATCH /api/v1/{owner}/{repo}/branches/update_default_branch.json?name=....branch +restore --id --namemaps toPOST /api/v1/{owner}/{repo}/branches/restore.jsonwithbranch_idandbranch_name.
Write operations support --dry-run so users and Agents can inspect the exact request before changing branch state.
Validation
git diff --check
GOPROXY=https://goproxy.cn,direct go test ./shortcuts/branch ./shortcuts
go vet ./shortcuts/branch ./shortcuts
go run . branch +set-default --help
go run . branch +restore --help
GOPROXY=https://goproxy.cn,direct go test ./...
go vet ./...