feat(tpagectl): implement site get subcommand #553
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
thwap/thwap-pagesd!553
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/cli-site-get"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Implements the
site getsubcommand.SITEname./api/v1/sites/{name}(the daemon status endpoint) and decodes theSiteStatuspayload.Deployment: none).site "X" not founderror.listResponse/listDeploymenttypes tositeResponse/siteDeploymentso bothlistandgetdecode the sameSiteStatusshape (no duplication).Why
Phase 2 roadmap task #182.
Testing
go test -race ./...passes (17 packages)golangci-lint runcleanBreaking Changes
None.
Notes
#181 (show preview deployments) is deferred to Phase 4 — the daemon has no previews listing API yet (planned as
GET /api/v1/sites/{name}/previewsin #218). It remains unchecked in CLI-ROADMAP.md.Closes #178
Closes #179
Closes #180
Closes #182
Closes #188
Add site get: a required positional site name, GET /api/v1/sites/{name}, and a full configuration block showing owner, visibility, domain, URL, repo, preview status, creation time, and current deployment (version, commit, status, deployed at). Missing sites surface a friendly not-found error. Rename the shared listResponse/listDeployment types to siteResponse/ siteDeployment so both list and get decode the daemon SiteStatus payload.Record completion of the tpagectl site get subcommand: positional site name, GET /api/v1/sites/{name}, full configuration display, and current deployment information. Preview deployment display (#181) is deferred to the Phase 4 preview commands. closes #178 closes #179 closes #180 closes #182 closes #188Summary
site getsubcommand for tpagectl. Verified:go test -race ./...passes (17 packages) andgolangci-lint run ./...is clean. Closes #178/#179/#180/#182/#188; #181 (preview deployments) correctly deferred and left unchecked since the daemon has no previews API yet.Verified payload parity:
siteResponsemirrors the daemon'sSiteStatus(Site fields +url+current_deployment), matching the status endpoint output.No blocking issues.
Suggestions (filed as issues)
internal/tpagectl/site/get.go– only the 404 path is tested; non-404 error passthrough (500, 403 owner-scoped) is untested. Filed as #554Praise
listResponse→siteResponsereused by both list and get, no duplicationsite createErrNotFoundsemantics