team-toon-tack 3.2.5 → 3.2.6

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.
@@ -24,6 +24,14 @@ ttt work-on next
24
24
  ttt work-on {{ issue-id }}
25
25
  ```
26
26
 
27
+ ### Preview Mode (Dry Run)
28
+ ```bash
29
+ ttt work-on --dry-run # Interactive selection, preview only
30
+ ttt work-on next --dry-run # Auto-select, preview only
31
+ ```
32
+
33
+ Use `--dry-run` to preview task selection without changing any status.
34
+
27
35
  ## What This Does
28
36
 
29
37
  1. Marks the task as `in-progress` locally
@@ -6,19 +6,25 @@ import { getPrioritySortIndex, getSourceType, loadConfig, loadCycleData, loadLoc
6
6
  async function workOn() {
7
7
  const args = process.argv.slice(2);
8
8
  if (args.includes("--help") || args.includes("-h")) {
9
- console.log(`Usage: ttt work-on [issue-id]
9
+ console.log(`Usage: ttt work-on [issue-id] [options]
10
10
 
11
11
  Arguments:
12
12
  issue-id Issue ID (e.g., MP-624) or 'next' for auto-select
13
13
  If omitted, shows interactive selection
14
14
 
15
+ Options:
16
+ --dry-run Pick task without changing status (preview only)
17
+
15
18
  Examples:
16
19
  ttt work-on # Interactive selection
17
20
  ttt work-on MP-624 # Work on specific issue
18
- ttt work-on next # Auto-select highest priority`);
21
+ ttt work-on next # Auto-select highest priority
22
+ ttt work-on --dry-run # Preview selection without changes`);
19
23
  process.exit(0);
20
24
  }
21
- let issueId = args[0];
25
+ const dryRun = args.includes("--dry-run");
26
+ const filteredArgs = args.filter((a) => a !== "--dry-run");
27
+ let issueId = filteredArgs[0];
22
28
  const config = await loadConfig();
23
29
  const data = await loadCycleData();
24
30
  if (!data) {
@@ -83,8 +89,8 @@ Examples:
83
89
  console.log(`⚠️ 此任務 ${task.id} 正在審核中`);
84
90
  process.exit(0);
85
91
  }
86
- // Mark as In Progress
87
- if (task.localStatus === "pending") {
92
+ // Mark as In Progress (skip if dry-run)
93
+ if (task.localStatus === "pending" && !dryRun) {
88
94
  task.localStatus = "in-progress";
89
95
  // Update remote (only if status_source is 'remote' or not set)
90
96
  const statusSource = localConfig.status_source || "remote";
@@ -121,7 +127,13 @@ Examples:
121
127
  }
122
128
  }
123
129
  // Display task info
124
- displayTaskFull(task, "👷");
125
- console.log("Next: bun type-check && bun lint");
130
+ const icon = dryRun ? "🔍" : "👷";
131
+ displayTaskFull(task, icon);
132
+ if (dryRun) {
133
+ console.log("(dry-run: no changes made)");
134
+ }
135
+ else {
136
+ console.log("Next: bun type-check && bun lint");
137
+ }
126
138
  }
127
139
  workOn().catch(console.error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "team-toon-tack",
3
- "version": "3.2.5",
3
+ "version": "3.2.6",
4
4
  "description": "Linear & Trello task sync & management CLI with TOON format",
5
5
  "type": "module",
6
6
  "bin": {