Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .changeset/tugasna-help-fixes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"@sawala/cli": patch
---

Correct the `sawala tugasna` command help text to match the Tugasna API.
`comment create`/`comment update` now document the body field as `{ text }`
(it was mislabeled `{ body }`); `item move` documents `{ statusId, position }`
as both required; `backlog place` documents `statusId` as required; and the
`item create`/`item update` help notes that `startDate`/`dueDate` are epoch-ms
numbers, not date strings. Help text only — the requests the CLI sends are
unchanged (it passes your `--data`/`--file` body through verbatim).
12 changes: 6 additions & 6 deletions packages/sawala/src/commands/tugasna.ts
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ export function createTugasnaCommand(): Command {

item
.command('create <boardId>')
.description('Create an item on a board. Body: { title, description?, statusId?, assignees?, startDate?, dueDate? }.')
.description('Create an item on a board. Body: { title, description?, statusId?, assignees?, startDate?, dueDate? }. Dates are epoch-ms numbers, not date strings.')
.option('-f, --file <path>', "Read JSON body from path. Use '-' for stdin.")
.option('-d, --data <json>', 'Inline JSON body.')
.option('--dry-run', 'Validate and print the payload without writing.')
Expand All @@ -330,7 +330,7 @@ export function createTugasnaCommand(): Command {

item
.command('update <boardId> <itemId>')
.description('Update an item (PATCH). Body: any subset of the item fields.')
.description('Update an item (PATCH). Body: any subset of { title, description, startDate, dueDate }. Dates are epoch-ms numbers (or null to clear).')
.option('-f, --file <path>', "Read JSON body from path. Use '-' for stdin.")
.option('-d, --data <json>', 'Inline JSON body.')
.option('--dry-run', 'Validate and print the payload without writing.')
Expand Down Expand Up @@ -370,7 +370,7 @@ export function createTugasnaCommand(): Command {

item
.command('move <boardId> <itemId>')
.description('Move/reorder an item within or across statuses. Body: { statusId?, position? }.')
.description('Move/reorder an item within or across statuses. Body: { statusId, position } (both required; position is a 0-based index).')
.option('-f, --file <path>', "Read JSON body from path. Use '-' for stdin.")
.option('-d, --data <json>', 'Inline JSON body.')
.option('--dry-run', 'Validate and print the payload without writing.')
Expand Down Expand Up @@ -467,7 +467,7 @@ export function createTugasnaCommand(): Command {

backlog
.command('place <itemId>')
.description('Place a backlog item onto a board. Body: { boardId, statusId?, position? }.')
.description('Place a backlog item onto a board. Body: { boardId, statusId, position? } (boardId and statusId required).')
.option('-f, --file <path>', "Read JSON body from path. Use '-' for stdin.")
.option('-d, --data <json>', 'Inline JSON body.')
.option('--dry-run', 'Validate and print the payload without writing.')
Expand Down Expand Up @@ -518,7 +518,7 @@ export function createTugasnaCommand(): Command {

comment
.command('create <itemId>')
.description('Add a comment to an item. Body: { body } (the comment text).')
.description('Add a comment to an item. Body: { text } (the comment text; add { parentId } to reply).')
.option('-f, --file <path>', "Read JSON body from path. Use '-' for stdin.")
.option('-d, --data <json>', 'Inline JSON body.')
.option('--dry-run', 'Validate and print the payload without writing.')
Expand All @@ -534,7 +534,7 @@ export function createTugasnaCommand(): Command {

comment
.command('update <itemId> <commentId>')
.description('Edit a comment (PATCH). Body: { body }.')
.description('Edit a comment (PATCH). Body: { text }.')
.option('-f, --file <path>', "Read JSON body from path. Use '-' for stdin.")
.option('-d, --data <json>', 'Inline JSON body.')
.option('--dry-run', 'Validate and print the payload without writing.')
Expand Down
Loading