shapeup-cli 0.3.2 → 0.3.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 89595c1b4509ab13079e503ff5b94894c469220c070d1983389d8cd4ba3d2756
4
- data.tar.gz: eb5c3bde6d0988fdfc125a78268216f5dfb8736a4ff7082ed588d71de0ea6587
3
+ metadata.gz: 919e0d1e776b34cb20cb2854bedcb2b1c12806b79fc1cd5297df8e1506d70eab
4
+ data.tar.gz: 7e4a40392f129a6262627ace44cd164bff87ac160be9d8b93f495acab1838a35
5
5
  SHA512:
6
- metadata.gz: f7b3825df0045f80896ffbc17db90f57048084aa7eb2ac92ecb17b584c769d3affbcd7503fef3703fc7faf6d98c6127b557ffbdf5feb028d14e29db29a360424
7
- data.tar.gz: 5edd8c20f3ae4da183309750cb18cb5204036c955322c443e1d2e75e971f0c88a6e3e508d25723b30da5dee994d5cf1627486548f8b8d8fd729c151d10979143
6
+ metadata.gz: b3ef79a008f0f118d315621fe3980ba4d06f557f9276b19b569285e922647fd1e6f6e07924b25b21d3024281214297990859cf220dec3376890957f916cd3e4c
7
+ data.tar.gz: fc234742413cfe3e58d1cf75e19e48a88f28ff8fa300e4e6549a3948e09c53b4dbc02695e9792f1d2cc92fa03eef0acd8d19bfc27f0d40604b602750a9bb74ea
@@ -108,6 +108,22 @@ module ShapeupCli
108
108
  def positional_args
109
109
  @remaining.reject { |a| a.start_with?("--") }
110
110
  end
111
+
112
+ # Presence-only boolean flag. Returns true if present, removes from @remaining.
113
+ def consume_flag(flag)
114
+ !!@remaining.delete(flag)
115
+ end
116
+
117
+ # Parse --comments/--no-comments + --comments-limit N into MCP args.
118
+ def comment_flags
119
+ args = {}
120
+ args[:include_comments] = false if consume_flag("--no-comments")
121
+ consume_flag("--comments") # explicit opt-in, no-op since default is true
122
+ if (limit = extract_option("--comments-limit"))
123
+ args[:comments_limit] = limit.to_i
124
+ end
125
+ args
126
+ end
111
127
  end
112
128
  end
113
129
  end
@@ -37,7 +37,9 @@ module ShapeupCli
37
37
  { name: "all", type: "bool", usage: "Include done/closed issues (hidden by default)" },
38
38
  { name: "content", type: "string", usage: "Issue content/description" },
39
39
  { name: "title", type: "string", usage: "Issue title (for update)" },
40
- { name: "archived", type: "bool", usage: "Include iceboxed issues in list" }
40
+ { name: "archived", type: "bool", usage: "Include iceboxed issues in list" },
41
+ { name: "no-comments", type: "bool", usage: "Hide embedded comments on show (default: show)" },
42
+ { name: "comments-limit", type: "integer", usage: "Max comments to embed on show (default: 10, max: 50)" }
41
43
  ],
42
44
  examples: [
43
45
  "shapeup issues",
@@ -125,14 +127,15 @@ module ShapeupCli
125
127
 
126
128
  def show
127
129
  id = positional_arg(1) || positional_arg(0) || abort("Usage: shapeup issue <id>")
128
- result = call_tool("show_issue", issue: id.to_s)
130
+ result = call_tool("show_issue", issue: id.to_s, **comment_flags)
129
131
 
130
132
  render result,
131
133
  summary: "Issue ##{id}",
132
134
  breadcrumbs: [
133
135
  { cmd: "shapeup issues move #{id} --column <id>", description: "Move to column" },
134
136
  { cmd: "shapeup issues icebox #{id}", description: "Move to icebox" },
135
- { cmd: "shapeup issues watch #{id}", description: "Watch this issue" }
137
+ { cmd: "shapeup issues watch #{id}", description: "Watch this issue" },
138
+ { cmd: "shapeup issue #{id} --no-comments", description: "Hide embedded comments" }
136
139
  ]
137
140
  end
138
141
 
@@ -20,7 +20,9 @@ module ShapeupCli
20
20
  { name: "limit", type: "integer", usage: "Limit number of results" },
21
21
  { name: "stream", type: "string", usage: "Stream name or ID (for create)" },
22
22
  { name: "appetite", type: "string", usage: "Appetite: unknown, small_batch, big_batch (for create, default: big_batch)" },
23
- { name: "cycle-id", type: "string", usage: "Assign to cycle ID (for create)" }
23
+ { name: "cycle-id", type: "string", usage: "Assign to cycle ID (for create)" },
24
+ { name: "no-comments", type: "bool", usage: "Hide embedded comments on show (default: show)" },
25
+ { name: "comments-limit", type: "integer", usage: "Max comments to embed on show (default: 10, max: 50)" }
24
26
  ],
25
27
  examples: [
26
28
  "shapeup pitches list",
@@ -74,7 +76,7 @@ module ShapeupCli
74
76
  def show(id = nil)
75
77
  id ||= positional_arg(1) || abort("Usage: shapeup pitches show <id>")
76
78
 
77
- result = call_tool("show_package", package: id.to_s)
79
+ result = call_tool("show_package", package: id.to_s, **comment_flags)
78
80
 
79
81
  render result,
80
82
  summary: "Pitch ##{id}",
@@ -82,7 +84,8 @@ module ShapeupCli
82
84
  { cmd: "shapeup scopes list --pitch #{id}", description: "List scopes" },
83
85
  { cmd: "shapeup scopes create --pitch #{id} \"Title\"", description: "Add a scope" },
84
86
  { cmd: "shapeup todo \"Task\" --pitch #{id}", description: "Add a task" },
85
- { cmd: "shapeup tasks list --pitch #{id}", description: "List all tasks" }
87
+ { cmd: "shapeup tasks list --pitch #{id}", description: "List all tasks" },
88
+ { cmd: "shapeup pitch #{id} --no-comments", description: "Hide embedded comments" }
86
89
  ]
87
90
  end
88
91
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shapeup-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - ShapeUp