feat(site): show preview deployments in site get #616

Merged
fuzzy merged 1 commit from feat/tpagectl-site-previews into main 2026-08-08 18:54:27 +00:00
Owner

What

Implements roadmap #181: site get now shows preview deployments when any exist.

  • site get (table format) fetches the site's previews via GET /api/v1/sites/{name}/previews and, when non-empty, prints a Previews: block with one line per preview — branch, path (/preview/<branch>), status, deployed — using fixed-width padding (deterministic output, no TTY dependence).
  • The previews fetch is best-effort: previews disabled, an empty list, or an unreachable endpoint simply omit the section without failing the command.
  • Command description updated; docs/commands/tpagectl-site-get.md and docs/man/tpagectl-site-get.1 regenerated.

Why

Roadmap task #181, the last unchecked item in Phase 2 (Site Management Commands).

Testing

  • site get shows Previews: with branches, paths, and statuses when the endpoint returns previews
  • Empty preview list omits the section
  • Preview fetch failure (5xx) omits the section without erroring
  • Existing get tests updated (TestGetFullConfig server now serves the previews path); --format json/yaml unaffected (no previews fetch)
  • Golden site-get-table.golden regenerated to include the Previews section
  • go test -race ./... passes
  • golangci-lint run clean
  • pre-commit hooks pass (gofmt, go mod tidy, go test)

Breaking Changes

None. site get output gains a Previews: block only when previews exist.

Closes #181

## What Implements roadmap #181: `site get` now shows preview deployments when any exist. - `site get` (table format) fetches the site's previews via `GET /api/v1/sites/{name}/previews` and, when non-empty, prints a `Previews:` block with one line per preview — branch, path (`/preview/<branch>`), status, deployed — using fixed-width padding (deterministic output, no TTY dependence). - The previews fetch is **best-effort**: previews disabled, an empty list, or an unreachable endpoint simply omit the section without failing the command. - Command description updated; `docs/commands/tpagectl-site-get.md` and `docs/man/tpagectl-site-get.1` regenerated. ## Why Roadmap task #181, the last unchecked item in Phase 2 (Site Management Commands). ## Testing - [x] `site get` shows `Previews:` with branches, paths, and statuses when the endpoint returns previews - [x] Empty preview list omits the section - [x] Preview fetch failure (5xx) omits the section without erroring - [x] Existing get tests updated (`TestGetFullConfig` server now serves the previews path); `--format json/yaml` unaffected (no previews fetch) - [x] Golden `site-get-table.golden` regenerated to include the Previews section - [x] `go test -race ./...` passes - [x] `golangci-lint run` clean - [x] pre-commit hooks pass (gofmt, go mod tidy, go test) ## Breaking Changes None. `site get` output gains a `Previews:` block only when previews exist. Closes #181
feat(site): show preview deployments in site get
Some checks failed
Test and Release / lint (pull_request) Has been cancelled
Test and Release / test (pull_request) Has been cancelled
e7db8d7fbe
site get now fetches the site's previews (GET /api/v1/sites/{name}/previews)
on the table format and prints a Previews: block (branch, path, status,
deployed) when any exist. The fetch is best-effort: previews disabled or an
unreachable endpoint simply omit the section. Updated the command
description and regenerated the site-get docs.

Closes #181
fuzzy force-pushed feat/tpagectl-site-previews from e7db8d7fbe
Some checks failed
Test and Release / lint (pull_request) Has been cancelled
Test and Release / test (pull_request) Has been cancelled
to c8f8f4891c
Some checks failed
CI / docker (pull_request) Successful in 2m3s
CI / test (pull_request) Successful in 4m34s
CI / lint (pull_request) Failing after 11m51s
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled
CI / docker (push) Has been cancelled
CI / build (push) Has been cancelled
CI / build (pull_request) Successful in 18m43s
2026-08-08 17:13:44 +00:00
Compare
fuzzy scheduled this pull request to auto merge when all checks succeed 2026-08-08 17:13:56 +00:00
fuzzy merged commit c8f8f4891c into main 2026-08-08 18:54:27 +00:00
fuzzy deleted branch feat/tpagectl-site-previews 2026-08-08 18:54:27 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 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
thwap/thwap-pagesd!616
No description provided.