bl 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bl/cli.rb +3 -36
- data/lib/bl/formatting.rb +14 -0
- data/lib/bl/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7f357e828e914916ed8fc6af6119324c92b28e28
|
4
|
+
data.tar.gz: b41bf4e31e0309dd70e15e5b674014b5cc40a61f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 934766a76315e0d2538587d263c65f63793dca0754d4d51bc511c17168a82a004aafd4bdf40f793b927336e018ad317d39988cadb790d60ede6b8959a53bf730
|
7
|
+
data.tar.gz: 85a31e5aa566ae3fa0d77d39caca44256d10f7a7b6abca7a27e3c686529537da1190a216c197db8f95553397b21e07b4a9c20a02919ee9370b983381033e5c91
|
data/lib/bl/cli.rb
CHANGED
@@ -116,18 +116,7 @@ module Bl
|
|
116
116
|
options ISSUES_PARAMS
|
117
117
|
def issues
|
118
118
|
client.get('issues', {}.merge(options)).body.each do |i|
|
119
|
-
|
120
|
-
colorize_type(i.issueType.name, i.issueType.color),
|
121
|
-
i.issueKey,
|
122
|
-
i.summary,
|
123
|
-
colorize_priority(i.priority.id, i.priority.name),
|
124
|
-
i.created,
|
125
|
-
i.dueDate,
|
126
|
-
i.updated,
|
127
|
-
i.createdUser.name,
|
128
|
-
i.assignee&.name,
|
129
|
-
colorize_status(i.status.id, i.status.name)
|
130
|
-
].join("\t")
|
119
|
+
print_issue(i)
|
131
120
|
end
|
132
121
|
end
|
133
122
|
|
@@ -153,18 +142,7 @@ module Bl
|
|
153
142
|
end
|
154
143
|
opts[:categoryId] = [-1] if options[:nocategory]
|
155
144
|
client.get('issues', opts).body.each do |i|
|
156
|
-
|
157
|
-
colorize_type(i.issueType.name, i.issueType.color),
|
158
|
-
i.issueKey,
|
159
|
-
i.summary,
|
160
|
-
colorize_priority(i.priority.id, i.priority.name),
|
161
|
-
i.created,
|
162
|
-
i.dueDate,
|
163
|
-
i.updated,
|
164
|
-
i.createdUser.name,
|
165
|
-
i.assignee&.name,
|
166
|
-
colorize_status(i.status.id, i.status.name)
|
167
|
-
].join("\t")
|
145
|
+
print_issue(i)
|
168
146
|
end
|
169
147
|
end
|
170
148
|
|
@@ -174,18 +152,7 @@ module Bl
|
|
174
152
|
option :assigneeId, type: :array
|
175
153
|
def search
|
176
154
|
client.get('issues', options.to_h).body.each do |i|
|
177
|
-
|
178
|
-
i.issueType.name,
|
179
|
-
i.issueKey,
|
180
|
-
i.summary,
|
181
|
-
i.priority.name,
|
182
|
-
i.created,
|
183
|
-
i.dueDate,
|
184
|
-
i.updated,
|
185
|
-
i.createdUser.name,
|
186
|
-
i.assignee&.name,
|
187
|
-
i.status.name
|
188
|
-
].join("\t")
|
155
|
+
print_issue(i)
|
189
156
|
end
|
190
157
|
end
|
191
158
|
|
data/lib/bl/formatting.rb
CHANGED
@@ -34,5 +34,19 @@ module Bl
|
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
37
|
+
def print_issue(issue)
|
38
|
+
puts [
|
39
|
+
colorize_type(issue.issueType.name, issue.issueType.color),
|
40
|
+
issue.issueKey,
|
41
|
+
issue.summary,
|
42
|
+
colorize_priority(issue.priority.id, issue.priority.name),
|
43
|
+
issue.created,
|
44
|
+
issue.dueDate,
|
45
|
+
issue.updated,
|
46
|
+
issue.createdUser.name,
|
47
|
+
issue.assignee&.name,
|
48
|
+
colorize_status(issue.status.id, issue.status.name)
|
49
|
+
].join("\t")
|
50
|
+
end
|
37
51
|
end
|
38
52
|
end
|
data/lib/bl/version.rb
CHANGED