Skip to content

feat: add vers repo command for managing repositories and repo tags#173

Merged
AlephNotation merged 4 commits intomainfrom
ty/repos
Apr 6, 2026
Merged

feat: add vers repo command for managing repositories and repo tags#173
AlephNotation merged 4 commits intomainfrom
ty/repos

Conversation

@AlephNotation
Copy link
Copy Markdown
Contributor

Summary

Adds the vers repo command with full CRUD for repositories and their tags.

Commands

vers repo create <name> [-d description]
vers repo list [-q] [--format json]
vers repo get <name> [--format json]
vers repo delete <name>...
vers repo visibility <name> --public[=false]
vers repo fork <org>/<repo>:<tag> [--repo-name X] [--tag-name Y]
vers repo tag create <repo> <tag> <commit-id> [-d description]
vers repo tag list <repo> [-q] [--format json]
vers repo tag get <repo> <tag> [--format json]
vers repo tag update <repo> <tag> [--commit X] [-d description]
vers repo tag delete <repo> <tag>...

Implementation

  • Uses Client.Execute directly since the Go SDK (vers-sdk-go) doesn't have repository endpoints yet. DTOs are defined locally in the CLI until SDK support lands.
  • Follows existing patterns: handlers, presenters, cobra commands (mirrors vers tag structure).
  • 4 new files, no modifications to existing code.

Testing

Smoke tested all endpoints against production:

  • repo create / list / get / delete
  • repo tag create / list / get
  • --format json and -q output modes ✅

Adds 'vers repo' with subcommands:
- repo create/list/get/delete - manage repositories
- repo visibility - set public/private
- repo fork - fork a public repository
- repo tag create/list/get/update/delete - manage tags within repos

Uses Client.Execute directly since the SDK doesn't have repo
endpoints yet. All DTOs are defined locally until SDK support lands.

Tested against production API - all endpoints working.
Replace hand-rolled DTOs and Client.Execute calls with the generated
SDK types (RepositoryService, vers.RepositoryInfo, vers.RepoTagInfo, etc).

Net -55 lines — handlers are simpler and type-safe now.
Tests the full CRUD lifecycle:
  create repo → list → get → create VM → commit → create tag →
  list tags → get tag → update tag → delete tag → delete repo

Cleans up all resources (repo + VM) via t.Cleanup regardless of
test outcome. Uses unique repo names to avoid collisions.
@AlephNotation AlephNotation merged commit 0889bac into main Apr 6, 2026
6 checks passed
@AlephNotation AlephNotation deleted the ty/repos branch April 6, 2026 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant