Skip to content

Add document CLI commands#1029

Merged
SachaProbo merged 1 commit intomainfrom
SachaProbo/cli-documents
Apr 13, 2026
Merged

Add document CLI commands#1029
SachaProbo merged 1 commit intomainfrom
SachaProbo/cli-documents

Conversation

@SachaProbo
Copy link
Copy Markdown
Contributor

@SachaProbo SachaProbo commented Apr 13, 2026

Add list, create, view, update, delete, archive, and unarchive subcommands under prb document.

Add document version subcommands: list-versions, view-version, create-draft, delete-draft, update-version, publish-major, and publish-minor.


Summary by cubic

Adds a new prb document CLI for document and version management, including create/list/view/update/delete, archive flows, version drafts, and publishing. Supports sorting, filtering, pagination, interactive prompts, and JSON output.

  • New Features
    • New top-level prb document command.
    • Document actions: list, create, view, update, delete, archive, unarchive (includes --trust-center-visibility on create/update).
    • Version actions: list-versions, view-version, create-draft, update-version, delete-draft, publish-major, publish-minor (optional --changelog).
    • Filtering, sorting, and pagination for list and list-versions; --output json supported for list, view, list-versions, and view-version.
    • Interactive prompts for create and safe delete confirmations; input enums validated.

Written for commit fbb4c29. Summary will update on new commits.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 16 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="pkg/cmd/document/list-versions/list_versions.go">

<violation number="1" location="pkg/cmd/document/list-versions/list_versions.go:120">
P2: Validate `--order-direction` before building `orderBy`; currently invalid values are forwarded to GraphQL instead of failing fast with a clear CLI error.</violation>
</file>

<file name="pkg/cmd/document/create-draft/create_draft.go">

<violation number="1" location="pkg/cmd/document/create-draft/create_draft.go:58">
P2: This command introduces a positional `document-id` argument, but project CLI conventions require user inputs to be passed via flags.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@SachaProbo SachaProbo force-pushed the SachaProbo/cli-documents branch from 8c147cd to 8543fb6 Compare April 13, 2026 12:13
Copy link
Copy Markdown
Contributor

@gearnode gearnode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Add list, create, view, update, delete, archive, and unarchive
subcommands under `prb document`.

Add document version subcommands: list-versions, view-version,
create-draft, delete-draft, update-version, publish-major, and
publish-minor.

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
@SachaProbo SachaProbo force-pushed the SachaProbo/cli-documents branch from 8543fb6 to fbb4c29 Compare April 13, 2026 12:23
@SachaProbo SachaProbo merged commit fbb4c29 into main Apr 13, 2026
16 checks passed
@SachaProbo SachaProbo deleted the SachaProbo/cli-documents branch April 13, 2026 12:24
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.

2 participants