lazylead 0.9.1 → 0.9.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lazylead.gemspec +4 -4
- data/lib/lazylead/task/accuracy/testcase.rb +4 -4
- data/lib/lazylead/task/loading.rb +3 -2
- data/lib/lazylead/task/micromanager.rb +27 -3
- data/lib/lazylead/version.rb +1 -1
- data/lib/messages/illegal_duedate_change.erb +5 -3
- data/lib/messages/loading.erb +1 -1
- data/readme.md +4 -2
- data/test/lazylead/task/accuracy/testcase_test.rb +18 -0
- data/test/lazylead/task/loading_test.rb +1 -0
- data/test/lazylead/task/micromanager_test.rb +7 -0
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a2bb060ea62241a94384885e9d05b876f451e60051a89bc4ee7d8e3f84680d4a
|
4
|
+
data.tar.gz: 9c5906d631101d1bff071934fe0c52a0b9e1d1c9f655fdb8c3f958ba168639f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a09897c26cffbce936e449973c6ddd115374a37fde1d5d8892832615b03410cdff4b6bc642923d373b15402ad29283719b90f34899b91a769d07994df20f7cb
|
7
|
+
data.tar.gz: 782c925452d6664542d3951bbf7ddde8e278211386c39b9593c94d2e54087789fc972db5f38ee8aaa0e6c4545732e6f36739b821ccaef20fe3b2f396a475c96f
|
data/lazylead.gemspec
CHANGED
@@ -32,7 +32,7 @@ Gem::Specification.new do |s|
|
|
32
32
|
s.rubygems_version = "2.2"
|
33
33
|
s.required_ruby_version = ">=2.6.5"
|
34
34
|
s.name = "lazylead"
|
35
|
-
s.version = "0.9.
|
35
|
+
s.version = "0.9.2"
|
36
36
|
s.license = "MIT"
|
37
37
|
s.summary = "Eliminate the annoying work within bug-trackers."
|
38
38
|
s.description = "Ticketing systems (Github, Jira, etc.) are strongly
|
@@ -45,7 +45,7 @@ tasks instead of solving technical problems."
|
|
45
45
|
s.authors = ["Yurii Dubinka"]
|
46
46
|
s.email = "yurii.dubinka@gmail.com"
|
47
47
|
s.homepage = "http://github.com/dgroup/lazylead"
|
48
|
-
s.post_install_message = "Thanks for installing Lazylead v0.9.
|
48
|
+
s.post_install_message = "Thanks for installing Lazylead v0.9.2!
|
49
49
|
Read our blog posts: https://lazylead.org
|
50
50
|
Stay in touch with the community in Telegram: https://t.me/lazylead
|
51
51
|
Follow us on Twitter: https://twitter.com/lazylead
|
@@ -89,10 +89,10 @@ tasks instead of solving technical problems."
|
|
89
89
|
s.add_development_dependency "net-ping", "2.0.8"
|
90
90
|
s.add_development_dependency "rake", "13.0.3"
|
91
91
|
s.add_development_dependency "random-port", "0.5.1"
|
92
|
-
s.add_development_dependency "rdoc", "6.3.
|
92
|
+
s.add_development_dependency "rdoc", "6.3.1"
|
93
93
|
s.add_development_dependency "rubocop", "1.13.0"
|
94
94
|
s.add_development_dependency "rubocop-minitest", "0.12.1"
|
95
|
-
s.add_development_dependency "rubocop-performance", "1.11.
|
95
|
+
s.add_development_dependency "rubocop-performance", "1.11.1"
|
96
96
|
s.add_development_dependency "rubocop-rake", "0.5.1"
|
97
97
|
s.add_development_dependency "rubocop-rspec", "2.3.0"
|
98
98
|
s.add_development_dependency "sqlint", "0.2.0"
|
@@ -65,20 +65,20 @@ module Lazylead
|
|
65
65
|
# Detect index of line with test case
|
66
66
|
def detect_tc(line, index)
|
67
67
|
return unless @tc.negative?
|
68
|
-
@tc = index if eql? line,
|
69
|
-
|
68
|
+
@tc = index if eql? line, %w[testcase: tc: teststeps: teststeps steps: tcsteps: tc testcases
|
69
|
+
steps usecase]
|
70
70
|
end
|
71
71
|
|
72
72
|
# Detect index of line with actual result
|
73
73
|
def detect_ar(line, index)
|
74
74
|
return unless @ar.negative? && index > @tc
|
75
|
-
@ar = index if starts? line, %w[ar: actualresult: ar= [ar]]
|
75
|
+
@ar = index if starts? line, %w[ar: actualresult: ar= [ar] actualresult]
|
76
76
|
end
|
77
77
|
|
78
78
|
# Detect index of line with expected result
|
79
79
|
def detect_er(line, index)
|
80
80
|
return unless @er.negative? && index > @tc
|
81
|
-
@er = index if starts? line, %w[er: expectedresult: er= [er]]
|
81
|
+
@er = index if starts? line, %w[er: expectedresult: er= [er] expectedresult]
|
82
82
|
end
|
83
83
|
|
84
84
|
def starts?(line, text)
|
@@ -72,8 +72,9 @@ module Lazylead
|
|
72
72
|
"#{id} has #{total} tasks"
|
73
73
|
end
|
74
74
|
|
75
|
-
def sprints
|
76
|
-
@tasks.group_by(&:sprint).sort
|
75
|
+
def sprints(*label)
|
76
|
+
return @tasks.group_by(&:sprint).sort if label.empty? || label.nil?
|
77
|
+
@tasks.group_by { |t| t.sprint(label) }.sort
|
77
78
|
end
|
78
79
|
end
|
79
80
|
|
@@ -43,20 +43,39 @@ module Lazylead
|
|
43
43
|
def run(sys, postman, opts)
|
44
44
|
allowed = opts.slice "allowed", ","
|
45
45
|
dues = sys.issues(opts["jql"], opts.jira_defaults.merge(expand: "changelog"))
|
46
|
-
.map { |i| Due.new(i, allowed) }
|
46
|
+
.map { |i| Due.new(i, allowed, since(opts)) }
|
47
47
|
.select(&:illegal?)
|
48
|
+
.reject(&:obsolete?)
|
48
49
|
return if dues.empty?
|
49
50
|
postman.send opts.merge(dues: dues)
|
50
51
|
end
|
52
|
+
|
53
|
+
# Detect history period where search should start.
|
54
|
+
#
|
55
|
+
# opts["period"] The default period for past is 1 day (86400 seconds).
|
56
|
+
# So, if now 2017-04-06 15:50:58.674+0000
|
57
|
+
# it returns 2017-04-05 15:50:58 +0000
|
58
|
+
#
|
59
|
+
# opts["now"] The current time for unit tests.
|
60
|
+
# If absent the "Time.now" is used.
|
61
|
+
#
|
62
|
+
def since(opts)
|
63
|
+
@since ||= if opts.key? "now"
|
64
|
+
Time.parse(opts["now"])
|
65
|
+
else
|
66
|
+
Time.now - opts.fetch("period", "86400").to_i
|
67
|
+
end
|
68
|
+
end
|
51
69
|
end
|
52
70
|
|
53
71
|
# Instance of "Due" history item for the particular ticket.
|
54
72
|
class Due
|
55
73
|
attr_reader :issue, :when
|
56
74
|
|
57
|
-
def initialize(issue, allowed)
|
75
|
+
def initialize(issue, allowed, since)
|
58
76
|
@issue = issue
|
59
77
|
@allowed = allowed
|
78
|
+
@since = since
|
60
79
|
end
|
61
80
|
|
62
81
|
# Gives true when last change of "Due Date" field was done
|
@@ -66,6 +85,11 @@ module Lazylead
|
|
66
85
|
@allowed.none? { |a| a.eql? last.id }
|
67
86
|
end
|
68
87
|
|
88
|
+
# Give true when "Due Date" changes happens in past and its alert already sent.
|
89
|
+
def obsolete?
|
90
|
+
@when < @since
|
91
|
+
end
|
92
|
+
|
69
93
|
# Detect details about last change of "Due Date" to non-null value
|
70
94
|
def last
|
71
95
|
@last ||= begin
|
@@ -76,7 +100,7 @@ module Lazylead
|
|
76
100
|
@when = @issue["created"]
|
77
101
|
dd = @issue.reporter
|
78
102
|
else
|
79
|
-
@when = dd["created"]
|
103
|
+
@when = dd["created"]
|
80
104
|
dd = Lazylead::User.new(dd["author"])
|
81
105
|
end
|
82
106
|
dd
|
data/lib/lazylead/version.rb
CHANGED
@@ -95,18 +95,20 @@
|
|
95
95
|
<th id="when">When</th>
|
96
96
|
<th id="who">Who</th>
|
97
97
|
<th id="to">To</th>
|
98
|
-
<th id="
|
98
|
+
<th id="assignee">Assignee</th>
|
99
99
|
<th id="reporter">Reporter</th>
|
100
|
+
<th id="summary">Summary</th>
|
100
101
|
</tr>
|
101
102
|
<% dues.each do |d| %>
|
102
103
|
<tr>
|
103
104
|
<td><a href='<%= d.issue.url %>'><%= d.issue.key %></a></td>
|
104
105
|
<td><%= d.issue.priority %></td>
|
105
|
-
<td><%= d.when %></td>
|
106
|
+
<td><%= d.when.to_date %></td>
|
106
107
|
<td><span style='color: red'><%= d.last.name %></span> (<%= d.last.id %>)</td>
|
107
108
|
<td><span style='color: red'><%= d.issue.duedate %></span></td>
|
108
|
-
<td><%= d.issue.
|
109
|
+
<td><%= d.issue.assignee.name %></td>
|
109
110
|
<td><%= d.issue.reporter.name %></td>
|
111
|
+
<td><%= d.issue.summary %></td>
|
110
112
|
</tr>
|
111
113
|
<% end %>
|
112
114
|
</table>
|
data/lib/messages/loading.erb
CHANGED
@@ -89,7 +89,7 @@
|
|
89
89
|
<% if assignment.free? %>
|
90
90
|
<span style="color: red">0</span>
|
91
91
|
<% else %>
|
92
|
-
<% assignment.sprints.each do |s| %>
|
92
|
+
<% assignment.sprints(defined?(sprint) ? sprint : "customfield_10480").each do |s| %>
|
93
93
|
<a href="<%= search_link %><%= CGI.escape("#{jql} and assignee=#{teammate}") %>">
|
94
94
|
<%= s.first.blank? ? "No sprint" : s.first %>: <%= s.last.size %>
|
95
95
|
</a>
|
data/readme.md
CHANGED
@@ -48,13 +48,15 @@ Join our telegram group [lazylead.org](https://t.me/lazyleads) for discussions.
|
|
48
48
|
| Create a meeting(s) automatically in case some tickets appeared (group by assignee/reporters/component/ticket type/etc) | ⌛ | ⌛ | ⌛ | ❌ |
|
49
49
|
| Propogate fields from parent tickets to sub-tasks | ✅ | ⌛ | ⌛ | ❌ |
|
50
50
|
| Notify about tickets without comments with expected text | ✅ | ⌛ | ⌛ | ❌ |
|
51
|
-
| Notify about team loading (no tasks on teammates) | ✅ | ⌛ | ⌛ | ❌ |
|
51
|
+
| [Notify about team loading (no tasks on teammates)](lib/lazylead/task/loading.rb) | ✅ | ⌛ | ⌛ | ❌ |
|
52
52
|
| Notify about tickets matches predefined multiple conditions | ✅ | ⌛ | ⌛ | ❌ |
|
53
53
|
| Link automatically the ticket and Confluence page if link found in ticket's comments/description | ✅ | ⌛ | ⌛ | ❌ |
|
54
54
|
| Notify about tickets assigned to your team members not by effective managers| ✅ | ⌛ | ⌛ | ❌ |
|
55
55
|
| Notify about modifications of important files in VCS | ❌ | ⌛ | ❌ | ✅ |
|
56
56
|
| Notify about diff changes for past X period in VCS | ❌ | ⌛ | ❌ | ✅ |
|
57
57
|
| Notify about changes with some text for past X period in VCS | ❌ | ⌛ | ❌ | ✅ |
|
58
|
+
| [Notify when someone outside of your team changed the due date on tickets for your team](lib/lazylead/task/micromanager.rb)| ✅ | ⌛ | ❌ | ❌ |
|
59
|
+
| [Notify when someone outside of your team assigned a ticket directly to the developer](lib/lazylead/task/assignment.rb)| ✅ | ⌛ | ❌ | ❌ |
|
58
60
|
|
59
61
|
| Integration | Type | Status |
|
60
62
|
| :---------------------------------------------------- | :-----------: | :----: |
|
@@ -65,7 +67,7 @@ Join our telegram group [lazylead.org](https://t.me/lazyleads) for discussions.
|
|
65
67
|
| calendar.google.com | Calendar | ⌛ |
|
66
68
|
| slack.com | Notifications | ⌛ |
|
67
69
|
|
68
|
-
✅ - implemented, ⌛ - planned, 🌵 - implemented, but not tested, ❌ - not supported
|
70
|
+
✅ - implemented, ⌛ - planned, 🌵 - implemented, but not tested, ❌ - not supported/planned.
|
69
71
|
|
70
72
|
New ideas, bugs, suggestions or questions are welcome [via GitHub issues](https://github.com/dgroup/lazylead/issues/new)!
|
71
73
|
|
@@ -273,6 +273,24 @@ module Lazylead
|
|
273
273
|
*{color:#DE10AA}[AR]{color}* = YYYY"
|
274
274
|
end
|
275
275
|
|
276
|
+
test "TC named use case" do
|
277
|
+
assert testcase? "{color:#0747a6}+*Use case*+{color}
|
278
|
+
# Step 1
|
279
|
+
# Step ..
|
280
|
+
# Step N
|
281
|
+
*{color:#00673A}[ER]{color}* = XXXX
|
282
|
+
*{color:#DE10AA}[AR]{color}* = YYYY"
|
283
|
+
end
|
284
|
+
|
285
|
+
test "TC with full ar er words" do
|
286
|
+
assert testcase? "{color:#0747a6}+*Use case*+{color}
|
287
|
+
# Step 1
|
288
|
+
# Step ..
|
289
|
+
# Step N
|
290
|
+
*{color:#00673A}Expected result:{color}* = XXXX
|
291
|
+
*{color:#DE10AA}Actual Result:{color}* = YYYY"
|
292
|
+
end
|
293
|
+
|
276
294
|
# ensure that issue description has a test case, AR and ER
|
277
295
|
def testcase?(desc)
|
278
296
|
Testcase.new.passed(OpenStruct.new(description: desc))
|
@@ -45,6 +45,7 @@ module Lazylead
|
|
45
45
|
"user_link" => "https://user.com?id=",
|
46
46
|
"search_link" => "https://jira.spring.io/issues/?jql=",
|
47
47
|
"fields" => "assignee,duedate,customfield_10480",
|
48
|
+
"sprint" => "customfield_10480",
|
48
49
|
"subject" => "[LL] Team loading",
|
49
50
|
"template" => "lib/messages/loading.erb"
|
50
51
|
)
|
@@ -43,6 +43,8 @@ module Lazylead
|
|
43
43
|
"jql" => "key in ('STS-3599','SPR-6541') and duedate is not empty",
|
44
44
|
"fields" => "assignee,duedate,priority,created,summary,reporter",
|
45
45
|
"allowed" => "tom,mike,bob",
|
46
|
+
"period" => "86400",
|
47
|
+
"now" => "2009-12-10T00:04:00.000+0000",
|
46
48
|
"subject" => "DD: How dare you?",
|
47
49
|
"template" => "lib/messages/illegal_duedate_change.erb"
|
48
50
|
)
|
@@ -50,5 +52,10 @@ module Lazylead
|
|
50
52
|
assert_email "DD: How dare you?",
|
51
53
|
%w[SPR-6541 Major (kdonald) 2009-12-10 Spring's\ Maven\ Central tom,mike,bob]
|
52
54
|
end
|
55
|
+
|
56
|
+
test "since for past 1 min" do
|
57
|
+
greater_or_eq Task::Micromanager.new.since("period" => 60).to_i,
|
58
|
+
(Time.now - 60).to_i
|
59
|
+
end
|
53
60
|
end
|
54
61
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lazylead
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yurii Dubinka
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-04
|
11
|
+
date: 2021-05-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -492,14 +492,14 @@ dependencies:
|
|
492
492
|
requirements:
|
493
493
|
- - '='
|
494
494
|
- !ruby/object:Gem::Version
|
495
|
-
version: 6.3.
|
495
|
+
version: 6.3.1
|
496
496
|
type: :development
|
497
497
|
prerelease: false
|
498
498
|
version_requirements: !ruby/object:Gem::Requirement
|
499
499
|
requirements:
|
500
500
|
- - '='
|
501
501
|
- !ruby/object:Gem::Version
|
502
|
-
version: 6.3.
|
502
|
+
version: 6.3.1
|
503
503
|
- !ruby/object:Gem::Dependency
|
504
504
|
name: rubocop
|
505
505
|
requirement: !ruby/object:Gem::Requirement
|
@@ -534,14 +534,14 @@ dependencies:
|
|
534
534
|
requirements:
|
535
535
|
- - '='
|
536
536
|
- !ruby/object:Gem::Version
|
537
|
-
version: 1.11.
|
537
|
+
version: 1.11.1
|
538
538
|
type: :development
|
539
539
|
prerelease: false
|
540
540
|
version_requirements: !ruby/object:Gem::Requirement
|
541
541
|
requirements:
|
542
542
|
- - '='
|
543
543
|
- !ruby/object:Gem::Version
|
544
|
-
version: 1.11.
|
544
|
+
version: 1.11.1
|
545
545
|
- !ruby/object:Gem::Dependency
|
546
546
|
name: rubocop-rake
|
547
547
|
requirement: !ruby/object:Gem::Requirement
|
@@ -786,7 +786,7 @@ licenses:
|
|
786
786
|
- MIT
|
787
787
|
metadata: {}
|
788
788
|
post_install_message: |-
|
789
|
-
Thanks for installing Lazylead v0.9.
|
789
|
+
Thanks for installing Lazylead v0.9.2!
|
790
790
|
Read our blog posts: https://lazylead.org
|
791
791
|
Stay in touch with the community in Telegram: https://t.me/lazylead
|
792
792
|
Follow us on Twitter: https://twitter.com/lazylead
|