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 +4 -4
- data/lib/shapeup_cli/commands/base.rb +16 -0
- data/lib/shapeup_cli/commands/issues.rb +6 -3
- data/lib/shapeup_cli/commands/pitches.rb +6 -3
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 919e0d1e776b34cb20cb2854bedcb2b1c12806b79fc1cd5297df8e1506d70eab
|
|
4
|
+
data.tar.gz: 7e4a40392f129a6262627ace44cd164bff87ac160be9d8b93f495acab1838a35
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|