Repository navigation
Add si site to publish a repository as a static site - #9
Conversation
si site view shows the address and state. si site publish starts a publish, and with --wait it polls every two seconds for up to about 90 seconds until the site is live or has failed. A rate-limited publish shows the server's message. si site unpublish takes it offline after a confirmation. The client crate gets site, publish_site and unpublish_site, with the Site type. Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
This change introduces a new si site command group to the CLI, enabling users to view, publish, and unpublish a repository's static site. The CLI's command parser and main dispatch are updated to support these subcommands. The new site module implements the logic for polling publish status, error handling, and confirmation prompts. The API client crate (sigit-si-api) gains a Site model and client methods for site operations, with tests for request construction and response parsing. The UI rendering module is extended to display site details. All changes are integrated with existing context and error handling. Previous findings appear addressed, and the new code is well-structured and tested.
Automated review by siGit Code Review · commit ec293c0 · see the review dashboard
Adds
si site view,publishandunpublish.publish --waitpolls the site every 2 seconds, up to about 90 seconds, until it isliveorfailed. A failed publish prints the server's error and exits non-zero. If the wait runs out, the error points atsi site view. A rate-limited publish (429) shows the server's message.unpublishasks first unless you pass--yes.The client crate gets
site,publish_siteandunpublish_site, and theSitetype.Checked with
cargo fmt --check,cargo clippy -D warnings,cargo test --workspaceandcargo check -p sigit-si-api --no-default-features.