mirror of
https://github.com/stablyai/orca.git
synced 2026-11-18 11:54:46 +00:00
`worktree set` read --comment through getOptionalStringFlag, which turns an empty value into undefined, so `--comment ""` and `--comment=` sent no comment field and the stored comment survived while the command reported ok:true. Keep an explicit empty value for this flag only; the shared helper and the RPC schema are unchanged. Fixes #37464
39 lines
1.7 KiB
TypeScript
39 lines
1.7 KiB
TypeScript
import type { CommandSpec } from '../args'
|
|
import { GLOBAL_FLAGS } from '../args'
|
|
|
|
export const WORKTREE_SET_COMMAND_SPEC: CommandSpec = {
|
|
path: ['worktree', 'set'],
|
|
summary: 'Update Orca metadata for a worktree',
|
|
usage:
|
|
'orca worktree set --worktree <selector> [--display-name <name>] [--issue <number|null>] [--pr <number|null>] [--linear-issue <identifier-or-url|null>] [--gitlab-issue <number-or-url|null>] [--gitlab-mr <number-or-url|null>] [--comment <text>] [--workspace-status <id>] [--unread|--read] [--parent-worktree <selector>|--no-parent] [--json]',
|
|
allowedFlags: [
|
|
...GLOBAL_FLAGS,
|
|
'worktree',
|
|
'display-name',
|
|
'issue',
|
|
'pr',
|
|
'linear-issue',
|
|
'gitlab-issue',
|
|
'gitlab-mr',
|
|
'comment',
|
|
'workspace-status',
|
|
'unread',
|
|
'read',
|
|
'parent-worktree',
|
|
'no-parent'
|
|
],
|
|
notes: [
|
|
'Workspace status ids match the board columns (defaults: todo, in-progress, in-review, completed); custom statuses use their configured id.',
|
|
'Pass --comment "" (or --comment=) to clear the comment.',
|
|
'Pass --linear-issue null to clear the Linear issue link.',
|
|
'Pass --pr null, --gitlab-issue null, or --gitlab-mr null to clear only the matching link.',
|
|
'Each link flag updates its own field and leaves unrelated links unchanged. GitLab URLs must match the stored source project or remote; they cannot select a foreign project.'
|
|
],
|
|
examples: [
|
|
'orca worktree set --worktree active --linear-issue STA-335 --json',
|
|
'orca worktree set --worktree active --linear-issue null --json',
|
|
'orca worktree set --worktree active --comment "" --json',
|
|
'orca worktree set --worktree active --workspace-status in-review --unread --json'
|
|
]
|
|
}
|