linear-sdk-cli 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/COVERAGE.md +4 -0
- package/MIGRATING.md +6 -0
- package/README.md +188 -37
- package/package.json +5 -5
- package/skills/linear-sdk-cli/SKILL.md +1 -0
- package/skills/linear-sdk-cli/references/auth.md +1 -0
- package/skills/linear-sdk-cli/references/config.md +10 -7
- package/skills/linear-sdk-cli/references/initiative.md +10 -5
- package/skills/linear-sdk-cli/references/issue.md +222 -77
- package/skills/linear-sdk-cli/references/notification.md +3 -3
- package/skills/linear-sdk-cli/references/project.md +9 -4
- package/src/commands/initiative.ts +23 -6
- package/src/commands/issue.ts +313 -12
- package/src/commands/meta.ts +55 -9
- package/src/commands/notification.ts +5 -3
- package/src/commands/project.ts +21 -3
- package/src/config.ts +111 -10
- package/src/lib/delegation.ts +240 -0
- package/src/lib/options.ts +17 -3
- package/src/lib/output-shapes.ts +77 -3
- package/src/output/lifecycle.ts +10 -0
- package/src/services/initiative.ts +12 -3
- package/src/services/issue.ts +498 -21
- package/src/services/project.ts +14 -3
|
@@ -40,6 +40,7 @@ completedAt: string | null
|
|
|
40
40
|
canceledAt: string | null
|
|
41
41
|
state: {id: string, name: string, type: string} | null
|
|
42
42
|
assignee: {id: string, displayName: string, email: string} | null
|
|
43
|
+
delegate: {id: string, displayName: string, name: string} | null
|
|
43
44
|
team: {id: string, key: string, name: string} | null
|
|
44
45
|
project: {id: string, name: string} | null
|
|
45
46
|
milestone: {id: string, name: string} | null
|
|
@@ -368,6 +369,10 @@ linear issue create [options]
|
|
|
368
369
|
| `--description-file <path>` | read description from a file ('-' = stdin) |
|
|
369
370
|
| `--editor` | compose the description in $EDITOR |
|
|
370
371
|
| `-a, --assignee <who>` | assignee (me\|email\|name\|id) |
|
|
372
|
+
| `--delegate <agent>` | delegate to an eligible agent app user (name or id) |
|
|
373
|
+
| `--clear-delegate` | explicitly create with no agent delegate |
|
|
374
|
+
| `--dry-run` | resolve and show the delegation mutation input without writing |
|
|
375
|
+
| `--full-result` | read back and verify the resulting delegate |
|
|
371
376
|
| `-s, --state <name>` | workflow state name or type |
|
|
372
377
|
| `-P, --priority <0-4>` | priority |
|
|
373
378
|
| `-l, --label <name>` | label (repeatable / comma-separated) |
|
|
@@ -397,6 +402,78 @@ checkedOut: boolean
|
|
|
397
402
|
stateChanged: boolean
|
|
398
403
|
```
|
|
399
404
|
|
|
405
|
+
With `--delegate`: the same, plus:
|
|
406
|
+
|
|
407
|
+
```text
|
|
408
|
+
assignee: {id: string, displayName: string, email: string} | null
|
|
409
|
+
delegate: {id: string, displayName: string, name: string} | null
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
With `--clear-delegate`: the same, plus:
|
|
413
|
+
|
|
414
|
+
```text
|
|
415
|
+
assignee: {id: string, displayName: string, email: string} | null
|
|
416
|
+
delegate: {id: string, displayName: string, name: string} | null
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
With `--dry-run`: a receipt object
|
|
420
|
+
|
|
421
|
+
```text
|
|
422
|
+
operation: string
|
|
423
|
+
dryRun: boolean
|
|
424
|
+
target: {id: string, identifier: string} | null
|
|
425
|
+
input: object
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
With `--full-result`: a receipt object
|
|
429
|
+
|
|
430
|
+
```text
|
|
431
|
+
receipt: {id: string, identifier: string, url: string, assignee: {id: string, displayName: string, email: string} | null, delegate: {id: string, displayName: string, name: string} | null}
|
|
432
|
+
resource: {id: string, identifier: string, title: string, description: string | null, priority: number, priorityLabel: string, estimate: number | null, url: string, branchName: string, dueDate: string | null, createdAt: string, updatedAt: string, archivedAt: string | null, trashed: boolean, startedAt: string | null, completedAt: string | null, canceledAt: string | null, state: {id: string, name: string, type: string} | null, assignee: {id: string, displayName: string, email: string} | null, delegate: {id: string, displayName: string, name: string} | null, team: {id: string, key: string, name: string} | null, project: {id: string, name: string} | null, milestone: {id: string, name: string} | null, cycle: {id: string, number: number, name: string | null} | null, parent: {id: string, identifier: string, title: string, state: {id: string, name: string, type: string} | null} | null, children: Array<{id: string, identifier: string, title: string, state: {id: string, name: string, type: string} | null}>, labels: Array<{id: string, name: string}>, subscribers: Array<{id: string, displayName: string}>, attachments: Array<{id: string, title: string, url: string, subtitle: string | null, sourceType: string | null, createdAt: string}>, documents: Array<{id: string, title: string, slugId: string, url: string, createdAt: string, updatedAt: string}>, relations: Array<{id: string, type: string, issue: {id: string, identifier: string, title: string, state: {id: string, name: string, type: string} | null}, relatedIssue: {id: string, identifier: string, title: string, state: {id: string, name: string, type: string} | null}}>, inverseRelations: Array<{id: string, type: string, issue: {id: string, identifier: string, title: string, state: {id: string, name: string, type: string} | null}, relatedIssue: {id: string, identifier: string, title: string, state: {id: string, name: string, type: string} | null}}>, comments: Array<{id: string, body: string, url: string, createdAt: string, editedAt: string | null, resolvedAt: string | null, parent: {id: string} | null, user: {id: string, displayName: string} | null, externalUser: {id: string, displayName: string} | null, resolvingCommentId: string | null, resolvingUser: {id: string, displayName: string} | null}>}
|
|
433
|
+
verified: boolean
|
|
434
|
+
```
|
|
435
|
+
|
|
436
|
+
### `linear issue delegate`
|
|
437
|
+
|
|
438
|
+
Delegate an issue to an eligible agent, or --clear it. Issue defaults to the branch.
|
|
439
|
+
|
|
440
|
+
```
|
|
441
|
+
linear issue delegate [options] [idOrAgent] [agent]
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
| Option | Description |
|
|
445
|
+
| --------------- | ---------------------------------------------------------- |
|
|
446
|
+
| `--clear` | remove the agent delegate |
|
|
447
|
+
| `--dry-run` | resolve and show the exact delegateId without writing |
|
|
448
|
+
| `--full-result` | read back the full issue and verify the resulting delegate |
|
|
449
|
+
|
|
450
|
+
**Output (`--json`)**: a receipt object
|
|
451
|
+
|
|
452
|
+
```text
|
|
453
|
+
id: string
|
|
454
|
+
identifier: string
|
|
455
|
+
url: string
|
|
456
|
+
assignee: {id: string, displayName: string, email: string} | null
|
|
457
|
+
delegate: {id: string, displayName: string, name: string} | null
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
With `--dry-run`: a receipt object
|
|
461
|
+
|
|
462
|
+
```text
|
|
463
|
+
operation: string
|
|
464
|
+
dryRun: boolean
|
|
465
|
+
target: {id: string, identifier: string} | null
|
|
466
|
+
input: object
|
|
467
|
+
```
|
|
468
|
+
|
|
469
|
+
With `--full-result`: a receipt object
|
|
470
|
+
|
|
471
|
+
```text
|
|
472
|
+
receipt: {id: string, identifier: string, url: string, assignee: {id: string, displayName: string, email: string} | null, delegate: {id: string, displayName: string, name: string} | null}
|
|
473
|
+
resource: {id: string, identifier: string, title: string, description: string | null, priority: number, priorityLabel: string, estimate: number | null, url: string, branchName: string, dueDate: string | null, createdAt: string, updatedAt: string, archivedAt: string | null, trashed: boolean, startedAt: string | null, completedAt: string | null, canceledAt: string | null, state: {id: string, name: string, type: string} | null, assignee: {id: string, displayName: string, email: string} | null, delegate: {id: string, displayName: string, name: string} | null, team: {id: string, key: string, name: string} | null, project: {id: string, name: string} | null, milestone: {id: string, name: string} | null, cycle: {id: string, number: number, name: string | null} | null, parent: {id: string, identifier: string, title: string, state: {id: string, name: string, type: string} | null} | null, children: Array<{id: string, identifier: string, title: string, state: {id: string, name: string, type: string} | null}>, labels: Array<{id: string, name: string}>, subscribers: Array<{id: string, displayName: string}>, attachments: Array<{id: string, title: string, url: string, subtitle: string | null, sourceType: string | null, createdAt: string}>, documents: Array<{id: string, title: string, slugId: string, url: string, createdAt: string, updatedAt: string}>, relations: Array<{id: string, type: string, issue: {id: string, identifier: string, title: string, state: {id: string, name: string, type: string} | null}, relatedIssue: {id: string, identifier: string, title: string, state: {id: string, name: string, type: string} | null}}>, inverseRelations: Array<{id: string, type: string, issue: {id: string, identifier: string, title: string, state: {id: string, name: string, type: string} | null}, relatedIssue: {id: string, identifier: string, title: string, state: {id: string, name: string, type: string} | null}}>, comments: Array<{id: string, body: string, url: string, createdAt: string, editedAt: string | null, resolvedAt: string | null, parent: {id: string} | null, user: {id: string, displayName: string} | null, externalUser: {id: string, displayName: string} | null, resolvingCommentId: string | null, resolvingUser: {id: string, displayName: string} | null}>}
|
|
474
|
+
verified: boolean
|
|
475
|
+
```
|
|
476
|
+
|
|
400
477
|
### `linear issue delete`
|
|
401
478
|
|
|
402
479
|
Delete (trash) an issue
|
|
@@ -468,16 +545,19 @@ id: string
|
|
|
468
545
|
|
|
469
546
|
### `linear issue label`
|
|
470
547
|
|
|
471
|
-
Add
|
|
548
|
+
Add, remove, or replace one member of a label group on an issue
|
|
472
549
|
|
|
473
550
|
```
|
|
474
551
|
linear issue label [options] [id]
|
|
475
552
|
```
|
|
476
553
|
|
|
477
|
-
| Option
|
|
478
|
-
|
|
|
479
|
-
| `--add <name>`
|
|
480
|
-
| `--remove <name>`
|
|
554
|
+
| Option | Description |
|
|
555
|
+
| --------------------------- | ------------------------------------------------------------------ |
|
|
556
|
+
| `--add <name>` | add a label (repeatable) |
|
|
557
|
+
| `--remove <name>` | remove a label (repeatable) |
|
|
558
|
+
| `--set-group <group=label>` | replace a group's direct member (repeatable; exact name or UUID) |
|
|
559
|
+
| `--dry-run` | resolve and show the exact relative-label mutation without writing |
|
|
560
|
+
| `--full-result` | read back and verify the resulting group labels |
|
|
481
561
|
|
|
482
562
|
**Output (`--json`)**: a receipt object
|
|
483
563
|
|
|
@@ -486,6 +566,35 @@ id: string
|
|
|
486
566
|
identifier: string
|
|
487
567
|
```
|
|
488
568
|
|
|
569
|
+
With `--set-group`: the same, plus:
|
|
570
|
+
|
|
571
|
+
```text
|
|
572
|
+
changed: boolean
|
|
573
|
+
mutationSent: boolean
|
|
574
|
+
groups: Array<{group: {id: string, name: string}, label: {id: string, name: string}}>
|
|
575
|
+
```
|
|
576
|
+
|
|
577
|
+
With `--dry-run`: a receipt object
|
|
578
|
+
|
|
579
|
+
```text
|
|
580
|
+
operation: string
|
|
581
|
+
dryRun: boolean
|
|
582
|
+
target: {id: string, identifier: string} | null
|
|
583
|
+
input: object
|
|
584
|
+
changed: boolean
|
|
585
|
+
mutationSent: boolean
|
|
586
|
+
groups: Array<{group: {id: string, name: string}, label: {id: string, name: string}}>
|
|
587
|
+
```
|
|
588
|
+
|
|
589
|
+
With `--full-result`: a receipt object
|
|
590
|
+
|
|
591
|
+
```text
|
|
592
|
+
receipt: {id: string, identifier: string, changed: boolean, mutationSent: boolean, groups: Array<{group: {id: string, name: string}, label: {id: string, name: string}}>}
|
|
593
|
+
resource: {id: string, identifier: string, title: string, description: string | null, priority: number, priorityLabel: string, estimate: number | null, url: string, branchName: string, dueDate: string | null, createdAt: string, updatedAt: string, archivedAt: string | null, trashed: boolean, startedAt: string | null, completedAt: string | null, canceledAt: string | null, state: {id: string, name: string, type: string} | null, assignee: {id: string, displayName: string, email: string} | null, delegate: {id: string, displayName: string, name: string} | null, team: {id: string, key: string, name: string} | null, project: {id: string, name: string} | null, milestone: {id: string, name: string} | null, cycle: {id: string, number: number, name: string | null} | null, parent: {id: string, identifier: string, title: string, state: {id: string, name: string, type: string} | null} | null, children: Array<{id: string, identifier: string, title: string, state: {id: string, name: string, type: string} | null}>, labels: Array<{id: string, name: string}>, subscribers: Array<{id: string, displayName: string}>, attachments: Array<{id: string, title: string, url: string, subtitle: string | null, sourceType: string | null, createdAt: string}>, documents: Array<{id: string, title: string, slugId: string, url: string, createdAt: string, updatedAt: string}>, relations: Array<{id: string, type: string, issue: {id: string, identifier: string, title: string, state: {id: string, name: string, type: string} | null}, relatedIssue: {id: string, identifier: string, title: string, state: {id: string, name: string, type: string} | null}}>, inverseRelations: Array<{id: string, type: string, issue: {id: string, identifier: string, title: string, state: {id: string, name: string, type: string} | null}, relatedIssue: {id: string, identifier: string, title: string, state: {id: string, name: string, type: string} | null}}>, comments: Array<{id: string, body: string, url: string, createdAt: string, editedAt: string | null, resolvedAt: string | null, parent: {id: string} | null, user: {id: string, displayName: string} | null, externalUser: {id: string, displayName: string} | null, resolvingCommentId: string | null, resolvingUser: {id: string, displayName: string} | null}>}
|
|
594
|
+
priorState: Array<{group: {id: string, name: string}, labels: Array<{id: string, name: string}>}>
|
|
595
|
+
verified: boolean
|
|
596
|
+
```
|
|
597
|
+
|
|
489
598
|
### `linear issue list`
|
|
490
599
|
|
|
491
600
|
List issues with filters
|
|
@@ -496,24 +605,24 @@ Aliases: `ls`, `query`
|
|
|
496
605
|
linear issue list [options]
|
|
497
606
|
```
|
|
498
607
|
|
|
499
|
-
| Option | Description
|
|
500
|
-
| ------------------------ |
|
|
501
|
-
| `-t, --team <key>` | filter by team key (repeatable; default: configured team)
|
|
502
|
-
| `-s, --state <name>` | filter by workflow state name/type (repeatable)
|
|
503
|
-
| `-a, --assignee <who>` | filter by assignee (me\|email\|name)
|
|
504
|
-
| `-U, --unassigned` | only issues with no assignee
|
|
505
|
-
| `-p, --project <name>` | filter by project
|
|
506
|
-
| `--project-label <name>` | filter by the project's label (excludes --project)
|
|
507
|
-
| `--milestone <name>` | filter by project milestone
|
|
508
|
-
| `-l, --label <name>` | filter by label (repeat to narrow)
|
|
509
|
-
| `-P, --priority <0-4>` | filter by priority
|
|
510
|
-
| `--cycle <n>` | cycle number, name, id, or 'current'
|
|
511
|
-
| `--created-after <date>` | only issues created at/after a date (YYYY-MM-DD)
|
|
512
|
-
| `--updated-after <date>` | only issues updated at/after a date (YYYY-MM-DD)
|
|
513
|
-
| `--all-teams` | search every team, ignoring the default team
|
|
514
|
-
| `--include-archived` | include archived
|
|
515
|
-
| `--query <text>` | full-text search
|
|
516
|
-
| `--sort <field>` | sort order
|
|
608
|
+
| Option | Description |
|
|
609
|
+
| ------------------------ | -------------------------------------------------------------------- |
|
|
610
|
+
| `-t, --team <key>` | filter by team key (repeatable; default: configured team) |
|
|
611
|
+
| `-s, --state <name>` | filter by workflow state name/type (repeatable) |
|
|
612
|
+
| `-a, --assignee <who>` | filter by assignee (me\|email\|name) |
|
|
613
|
+
| `-U, --unassigned` | only issues with no assignee |
|
|
614
|
+
| `-p, --project <name>` | filter by project |
|
|
615
|
+
| `--project-label <name>` | filter by the project's label (excludes --project) |
|
|
616
|
+
| `--milestone <name>` | filter by project milestone |
|
|
617
|
+
| `-l, --label <name>` | filter by label (repeat to narrow) |
|
|
618
|
+
| `-P, --priority <0-4>` | filter by priority |
|
|
619
|
+
| `--cycle <n>` | cycle number, name, id, or 'current' |
|
|
620
|
+
| `--created-after <date>` | only issues created at/after a date (YYYY-MM-DD) |
|
|
621
|
+
| `--updated-after <date>` | only issues updated at/after a date (YYYY-MM-DD) |
|
|
622
|
+
| `--all-teams` | search every team, ignoring the default team |
|
|
623
|
+
| `--include-archived` | include archived resources (the API may also return trashed records) |
|
|
624
|
+
| `--query <text>` | full-text search |
|
|
625
|
+
| `--sort <field>` | sort order |
|
|
517
626
|
|
|
518
627
|
**Output (`--json`)**: a bare array of objects
|
|
519
628
|
|
|
@@ -547,23 +656,23 @@ List your unstarted issues (--all-states for every state)
|
|
|
547
656
|
linear issue mine [options]
|
|
548
657
|
```
|
|
549
658
|
|
|
550
|
-
| Option | Description
|
|
551
|
-
| ------------------------ |
|
|
552
|
-
| `-t, --team <key>` | filter by team key (repeatable; default: configured team)
|
|
553
|
-
| `-s, --state <name>` | filter by workflow state name/type (repeatable)
|
|
554
|
-
| `-p, --project <name>` | filter by project
|
|
555
|
-
| `--project-label <name>` | filter by the project's label (excludes --project)
|
|
556
|
-
| `--milestone <name>` | filter by project milestone
|
|
557
|
-
| `-l, --label <name>` | filter by label (repeat to narrow)
|
|
558
|
-
| `-P, --priority <0-4>` | filter by priority
|
|
559
|
-
| `--cycle <n>` | cycle number, name, id, or 'current'
|
|
560
|
-
| `--created-after <date>` | only issues created at/after a date (YYYY-MM-DD)
|
|
561
|
-
| `--updated-after <date>` | only issues updated at/after a date (YYYY-MM-DD)
|
|
562
|
-
| `--all-teams` | search every team, ignoring the default team
|
|
563
|
-
| `--include-archived` | include archived
|
|
564
|
-
| `--query <text>` | full-text search
|
|
565
|
-
| `--sort <field>` | sort order
|
|
566
|
-
| `--all-states` | include every workflow state, not just unstarted
|
|
659
|
+
| Option | Description |
|
|
660
|
+
| ------------------------ | -------------------------------------------------------------------- |
|
|
661
|
+
| `-t, --team <key>` | filter by team key (repeatable; default: configured team) |
|
|
662
|
+
| `-s, --state <name>` | filter by workflow state name/type (repeatable) |
|
|
663
|
+
| `-p, --project <name>` | filter by project |
|
|
664
|
+
| `--project-label <name>` | filter by the project's label (excludes --project) |
|
|
665
|
+
| `--milestone <name>` | filter by project milestone |
|
|
666
|
+
| `-l, --label <name>` | filter by label (repeat to narrow) |
|
|
667
|
+
| `-P, --priority <0-4>` | filter by priority |
|
|
668
|
+
| `--cycle <n>` | cycle number, name, id, or 'current' |
|
|
669
|
+
| `--created-after <date>` | only issues created at/after a date (YYYY-MM-DD) |
|
|
670
|
+
| `--updated-after <date>` | only issues updated at/after a date (YYYY-MM-DD) |
|
|
671
|
+
| `--all-teams` | search every team, ignoring the default team |
|
|
672
|
+
| `--include-archived` | include archived resources (the API may also return trashed records) |
|
|
673
|
+
| `--query <text>` | full-text search |
|
|
674
|
+
| `--sort <field>` | sort order |
|
|
675
|
+
| `--all-states` | include every workflow state, not just unstarted |
|
|
567
676
|
|
|
568
677
|
**Output (`--json`)**: a bare array of objects
|
|
569
678
|
|
|
@@ -664,23 +773,23 @@ Full-text search across issues (scoped to the default team; --all-teams widens)
|
|
|
664
773
|
linear issue search [options] <text>
|
|
665
774
|
```
|
|
666
775
|
|
|
667
|
-
| Option | Description
|
|
668
|
-
| ------------------------ |
|
|
669
|
-
| `-t, --team <key>` | filter by team key (repeatable; default: configured team)
|
|
670
|
-
| `-s, --state <name>` | filter by workflow state name/type (repeatable)
|
|
671
|
-
| `-a, --assignee <who>` | filter by assignee (me\|email\|name)
|
|
672
|
-
| `-U, --unassigned` | only issues with no assignee
|
|
673
|
-
| `-p, --project <name>` | filter by project
|
|
674
|
-
| `--project-label <name>` | filter by the project's label (excludes --project)
|
|
675
|
-
| `--milestone <name>` | filter by project milestone
|
|
676
|
-
| `-l, --label <name>` | filter by label (repeat to narrow)
|
|
677
|
-
| `-P, --priority <0-4>` | filter by priority
|
|
678
|
-
| `--cycle <n>` | cycle number, name, id, or 'current'
|
|
679
|
-
| `--created-after <date>` | only issues created at/after a date (YYYY-MM-DD)
|
|
680
|
-
| `--updated-after <date>` | only issues updated at/after a date (YYYY-MM-DD)
|
|
681
|
-
| `--all-teams` | search every team, ignoring the default team
|
|
682
|
-
| `--include-archived` | include archived
|
|
683
|
-
| `--search-comments` | match comment bodies as well as titles and descriptions
|
|
776
|
+
| Option | Description |
|
|
777
|
+
| ------------------------ | -------------------------------------------------------------------- |
|
|
778
|
+
| `-t, --team <key>` | filter by team key (repeatable; default: configured team) |
|
|
779
|
+
| `-s, --state <name>` | filter by workflow state name/type (repeatable) |
|
|
780
|
+
| `-a, --assignee <who>` | filter by assignee (me\|email\|name) |
|
|
781
|
+
| `-U, --unassigned` | only issues with no assignee |
|
|
782
|
+
| `-p, --project <name>` | filter by project |
|
|
783
|
+
| `--project-label <name>` | filter by the project's label (excludes --project) |
|
|
784
|
+
| `--milestone <name>` | filter by project milestone |
|
|
785
|
+
| `-l, --label <name>` | filter by label (repeat to narrow) |
|
|
786
|
+
| `-P, --priority <0-4>` | filter by priority |
|
|
787
|
+
| `--cycle <n>` | cycle number, name, id, or 'current' |
|
|
788
|
+
| `--created-after <date>` | only issues created at/after a date (YYYY-MM-DD) |
|
|
789
|
+
| `--updated-after <date>` | only issues updated at/after a date (YYYY-MM-DD) |
|
|
790
|
+
| `--all-teams` | search every team, ignoring the default team |
|
|
791
|
+
| `--include-archived` | include archived resources (the API may also return trashed records) |
|
|
792
|
+
| `--search-comments` | match comment bodies as well as titles and descriptions |
|
|
684
793
|
|
|
685
794
|
**Output (`--json`)**: a bare array of objects
|
|
686
795
|
|
|
@@ -817,26 +926,30 @@ Aliases: `edit`
|
|
|
817
926
|
linear issue update [options] [id]
|
|
818
927
|
```
|
|
819
928
|
|
|
820
|
-
| Option | Description
|
|
821
|
-
| --------------------------- |
|
|
822
|
-
| `--title <title>` | new title
|
|
823
|
-
| `-d, --description <text>` | new description
|
|
824
|
-
| `--description-file <path>` | read description from a file ('-' = stdin)
|
|
825
|
-
| `-t, --team <key>` | move the issue to another team (changes its identifier)
|
|
826
|
-
| `-a, --assignee <who>` | assignee (me\|email\|name\|id)
|
|
827
|
-
|
|
|
828
|
-
| `-
|
|
829
|
-
| `-
|
|
830
|
-
|
|
|
831
|
-
| `--
|
|
832
|
-
| `--
|
|
833
|
-
| `--
|
|
834
|
-
| `--
|
|
835
|
-
|
|
|
836
|
-
|
|
|
837
|
-
| `--
|
|
838
|
-
| `--
|
|
839
|
-
| `--
|
|
929
|
+
| Option | Description |
|
|
930
|
+
| --------------------------- | -------------------------------------------------------------- |
|
|
931
|
+
| `--title <title>` | new title |
|
|
932
|
+
| `-d, --description <text>` | new description |
|
|
933
|
+
| `--description-file <path>` | read description from a file ('-' = stdin) |
|
|
934
|
+
| `-t, --team <key>` | move the issue to another team (changes its identifier) |
|
|
935
|
+
| `-a, --assignee <who>` | assignee (me\|email\|name\|id) |
|
|
936
|
+
| `--delegate <agent>` | delegate to an eligible agent app user (name or id) |
|
|
937
|
+
| `-s, --state <name>` | workflow state name or type |
|
|
938
|
+
| `-P, --priority <0-4>` | priority |
|
|
939
|
+
| `-p, --project <name>` | project name or id |
|
|
940
|
+
| `--milestone <name>` | project milestone |
|
|
941
|
+
| `--cycle <n>` | cycle number, name, id, or 'current' |
|
|
942
|
+
| `--estimate <n>` | estimate points |
|
|
943
|
+
| `--parent <id>` | parent issue id |
|
|
944
|
+
| `--due <date>` | due date (YYYY-MM-DD) |
|
|
945
|
+
| `-l, --label <name>` | replace all labels (repeatable / comma-separated) |
|
|
946
|
+
| `--add-label <name>` | add a label (repeatable) |
|
|
947
|
+
| `--remove-label <name>` | remove a label (repeatable) |
|
|
948
|
+
| `--unassign` | clear the assignee |
|
|
949
|
+
| `--clear-delegate` | remove the agent delegate |
|
|
950
|
+
| `--clear-cycle` | remove the issue from its cycle |
|
|
951
|
+
| `--dry-run` | resolve and show the delegation mutation input without writing |
|
|
952
|
+
| `--full-result` | read back and verify the resulting delegate |
|
|
840
953
|
|
|
841
954
|
**Output (`--json`)**: a receipt object
|
|
842
955
|
|
|
@@ -846,6 +959,37 @@ identifier: string
|
|
|
846
959
|
url: string
|
|
847
960
|
```
|
|
848
961
|
|
|
962
|
+
With `--delegate`: the same, plus:
|
|
963
|
+
|
|
964
|
+
```text
|
|
965
|
+
assignee: {id: string, displayName: string, email: string} | null
|
|
966
|
+
delegate: {id: string, displayName: string, name: string} | null
|
|
967
|
+
```
|
|
968
|
+
|
|
969
|
+
With `--clear-delegate`: the same, plus:
|
|
970
|
+
|
|
971
|
+
```text
|
|
972
|
+
assignee: {id: string, displayName: string, email: string} | null
|
|
973
|
+
delegate: {id: string, displayName: string, name: string} | null
|
|
974
|
+
```
|
|
975
|
+
|
|
976
|
+
With `--dry-run`: a receipt object
|
|
977
|
+
|
|
978
|
+
```text
|
|
979
|
+
operation: string
|
|
980
|
+
dryRun: boolean
|
|
981
|
+
target: {id: string, identifier: string} | null
|
|
982
|
+
input: object
|
|
983
|
+
```
|
|
984
|
+
|
|
985
|
+
With `--full-result`: a receipt object
|
|
986
|
+
|
|
987
|
+
```text
|
|
988
|
+
receipt: {id: string, identifier: string, url: string, assignee: {id: string, displayName: string, email: string} | null, delegate: {id: string, displayName: string, name: string} | null}
|
|
989
|
+
resource: {id: string, identifier: string, title: string, description: string | null, priority: number, priorityLabel: string, estimate: number | null, url: string, branchName: string, dueDate: string | null, createdAt: string, updatedAt: string, archivedAt: string | null, trashed: boolean, startedAt: string | null, completedAt: string | null, canceledAt: string | null, state: {id: string, name: string, type: string} | null, assignee: {id: string, displayName: string, email: string} | null, delegate: {id: string, displayName: string, name: string} | null, team: {id: string, key: string, name: string} | null, project: {id: string, name: string} | null, milestone: {id: string, name: string} | null, cycle: {id: string, number: number, name: string | null} | null, parent: {id: string, identifier: string, title: string, state: {id: string, name: string, type: string} | null} | null, children: Array<{id: string, identifier: string, title: string, state: {id: string, name: string, type: string} | null}>, labels: Array<{id: string, name: string}>, subscribers: Array<{id: string, displayName: string}>, attachments: Array<{id: string, title: string, url: string, subtitle: string | null, sourceType: string | null, createdAt: string}>, documents: Array<{id: string, title: string, slugId: string, url: string, createdAt: string, updatedAt: string}>, relations: Array<{id: string, type: string, issue: {id: string, identifier: string, title: string, state: {id: string, name: string, type: string} | null}, relatedIssue: {id: string, identifier: string, title: string, state: {id: string, name: string, type: string} | null}}>, inverseRelations: Array<{id: string, type: string, issue: {id: string, identifier: string, title: string, state: {id: string, name: string, type: string} | null}, relatedIssue: {id: string, identifier: string, title: string, state: {id: string, name: string, type: string} | null}}>, comments: Array<{id: string, body: string, url: string, createdAt: string, editedAt: string | null, resolvedAt: string | null, parent: {id: string} | null, user: {id: string, displayName: string} | null, externalUser: {id: string, displayName: string} | null, resolvingCommentId: string | null, resolvingUser: {id: string, displayName: string} | null}>}
|
|
990
|
+
verified: boolean
|
|
991
|
+
```
|
|
992
|
+
|
|
849
993
|
### `linear issue url`
|
|
850
994
|
|
|
851
995
|
Print the issue URL
|
|
@@ -897,6 +1041,7 @@ completedAt: string | null
|
|
|
897
1041
|
canceledAt: string | null
|
|
898
1042
|
state: {id: string, name: string, type: string} | null
|
|
899
1043
|
assignee: {id: string, displayName: string, email: string} | null
|
|
1044
|
+
delegate: {id: string, displayName: string, name: string} | null
|
|
900
1045
|
team: {id: string, key: string, name: string} | null
|
|
901
1046
|
project: {id: string, name: string} | null
|
|
902
1047
|
milestone: {id: string, name: string} | null
|
|
@@ -43,9 +43,9 @@ Aliases: `ls`
|
|
|
43
43
|
linear notification list [options]
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
| Option | Description
|
|
47
|
-
| -------------------- |
|
|
48
|
-
| `--include-archived` | include archived
|
|
46
|
+
| Option | Description |
|
|
47
|
+
| -------------------- | -------------------------------------------------------------------- |
|
|
48
|
+
| `--include-archived` | include archived resources (the API may also return trashed records) |
|
|
49
49
|
|
|
50
50
|
**Output (`--json`)**: a bare array of objects
|
|
51
51
|
|
|
@@ -39,6 +39,7 @@ createdAt: string
|
|
|
39
39
|
updatedAt: string
|
|
40
40
|
completedAt: string | null
|
|
41
41
|
archivedAt: string | null
|
|
42
|
+
trashed: boolean
|
|
42
43
|
lead: {id: string, displayName: string, email: string} | null
|
|
43
44
|
teams: Array<{id: string, key: string, name: string}>
|
|
44
45
|
members: Array<{id: string, displayName: string, email: string}>
|
|
@@ -125,10 +126,11 @@ Aliases: `ls`
|
|
|
125
126
|
linear project list [options]
|
|
126
127
|
```
|
|
127
128
|
|
|
128
|
-
| Option
|
|
129
|
-
|
|
|
130
|
-
| `--state <name>`
|
|
131
|
-
| `--all-teams`
|
|
129
|
+
| Option | Description |
|
|
130
|
+
| -------------------- | -------------------------------------------------------------------- |
|
|
131
|
+
| `--state <name>` | filter by status name or type (e.g. 'In QA', started) |
|
|
132
|
+
| `--all-teams` | every team's projects, ignoring the default team |
|
|
133
|
+
| `--include-archived` | include archived resources (the API may also return trashed records) |
|
|
132
134
|
|
|
133
135
|
**Output (`--json`)**: a bare array of objects
|
|
134
136
|
|
|
@@ -142,6 +144,8 @@ startDate: string | null
|
|
|
142
144
|
targetDate: string | null
|
|
143
145
|
status: {name: string} | null
|
|
144
146
|
lead: {displayName: string} | null
|
|
147
|
+
archivedAt: string | null
|
|
148
|
+
trashed: boolean
|
|
145
149
|
```
|
|
146
150
|
|
|
147
151
|
### `linear project milestones`
|
|
@@ -228,6 +232,7 @@ createdAt: string
|
|
|
228
232
|
updatedAt: string
|
|
229
233
|
completedAt: string | null
|
|
230
234
|
archivedAt: string | null
|
|
235
|
+
trashed: boolean
|
|
231
236
|
lead: {id: string, displayName: string, email: string} | null
|
|
232
237
|
teams: Array<{id: string, key: string, name: string}>
|
|
233
238
|
members: Array<{id: string, displayName: string, email: string}>
|
|
@@ -10,14 +10,26 @@ import { Command, Option } from "commander";
|
|
|
10
10
|
import { action } from "../lib/action.js";
|
|
11
11
|
import { resolveBody } from "../lib/body.js";
|
|
12
12
|
import { confirmDestructive, promptInput } from "../lib/prompt.js";
|
|
13
|
-
import {
|
|
13
|
+
import {
|
|
14
|
+
parseList,
|
|
15
|
+
parseIntOption,
|
|
16
|
+
addAliasOption,
|
|
17
|
+
readAlias,
|
|
18
|
+
addIncludeArchivedOption,
|
|
19
|
+
} from "../lib/options.js";
|
|
14
20
|
import type { Context } from "../context.js";
|
|
15
21
|
import * as svc from "../services/initiative.js";
|
|
16
22
|
import type { Column } from "../output/table.js";
|
|
23
|
+
import { lifecycleSuffix } from "../output/lifecycle.js";
|
|
17
24
|
|
|
18
25
|
const ROW_COLUMNS: Column<svc.InitiativeRow>[] = [
|
|
19
26
|
{ key: "name", header: "Name", value: (r) => r.name, max: 40 },
|
|
20
|
-
{
|
|
27
|
+
{
|
|
28
|
+
key: "status",
|
|
29
|
+
header: "Status",
|
|
30
|
+
value: (r) => `${r.status ?? "—"}${lifecycleSuffix(r)}`,
|
|
31
|
+
max: 24,
|
|
32
|
+
},
|
|
21
33
|
{
|
|
22
34
|
key: "priority",
|
|
23
35
|
header: "Pri",
|
|
@@ -34,7 +46,7 @@ export function registerInitiative(program: Command): void {
|
|
|
34
46
|
.description("Work with initiatives");
|
|
35
47
|
|
|
36
48
|
// list --------------------------------------------------------------------
|
|
37
|
-
initiative
|
|
49
|
+
const list = initiative
|
|
38
50
|
.command("list")
|
|
39
51
|
.alias("ls")
|
|
40
52
|
.description("List workspace initiatives (every status unless --status narrows)")
|
|
@@ -42,7 +54,6 @@ export function registerInitiative(program: Command): void {
|
|
|
42
54
|
// in the tree, and a short flag means one thing everywhere here.
|
|
43
55
|
.option("--status <name>", "filter by status (Planned, Active, Completed, Canceled, Proposed)")
|
|
44
56
|
.option("--owner <who>", "filter by owner (me|email|name|id)")
|
|
45
|
-
.option("--archived", "include archived initiatives")
|
|
46
57
|
// The reference CLI lists Active only and needs `--all-statuses` to widen;
|
|
47
58
|
// this list is every status already, so the flag is accepted as the no-op
|
|
48
59
|
// it is here rather than failing a transplanted script.
|
|
@@ -52,11 +63,13 @@ export function registerInitiative(program: Command): void {
|
|
|
52
63
|
const rows = await svc.listInitiatives(ctx.client, ctx.limit, {
|
|
53
64
|
status: opts.status,
|
|
54
65
|
owner: opts.owner,
|
|
55
|
-
|
|
66
|
+
includeArchived: !!readAlias<boolean>(opts, "--include-archived", "--archived"),
|
|
56
67
|
});
|
|
57
68
|
ctx.output.list(rows, ROW_COLUMNS, rows);
|
|
58
69
|
}),
|
|
59
70
|
);
|
|
71
|
+
addIncludeArchivedOption(list);
|
|
72
|
+
list.addOption(new Option("--archived", "compatibility alias of --include-archived"));
|
|
60
73
|
|
|
61
74
|
// view --------------------------------------------------------------------
|
|
62
75
|
initiative
|
|
@@ -68,7 +81,11 @@ export function registerInitiative(program: Command): void {
|
|
|
68
81
|
const detail = await svc.getInitiativeDetail(ctx.client, idArg);
|
|
69
82
|
ctx.output.detail(detail, [
|
|
70
83
|
["Initiative", detail.name],
|
|
71
|
-
[
|
|
84
|
+
[
|
|
85
|
+
"Trashed",
|
|
86
|
+
detail.trashed ? `YES (deleted ${detail.archivedAt ?? "at an unknown time"})` : null,
|
|
87
|
+
],
|
|
88
|
+
["Archived", !detail.trashed && detail.archivedAt ? `YES (${detail.archivedAt})` : null],
|
|
72
89
|
["Status", detail.status],
|
|
73
90
|
["Priority", detail.priority ? detail.priorityLabel : null],
|
|
74
91
|
["Labels", detail.labels.length ? detail.labels.join(", ") : null],
|