lazylead 0.11.0 → 0.11.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.docker/docker-compose.yml +9 -10
- data/Rakefile +1 -1
- data/lazylead.gemspec +10 -8
- data/lib/lazylead/opts.rb +2 -1
- data/lib/lazylead/postman.rb +60 -0
- data/lib/lazylead/schedule.rb +2 -2
- data/lib/lazylead/system/allocations.md +24 -0
- data/lib/lazylead/system/jira.rb +25 -5
- data/lib/lazylead/task/accuracy/accuracy.rb +12 -6
- data/lib/lazylead/task/accuracy/records.rb +2 -2
- data/lib/lazylead/task/accuracy/screenshots.rb +1 -1
- data/lib/lazylead/task/savepoint.rb +1 -1
- data/lib/lazylead/version.rb +1 -1
- data/readme.md +29 -34
- data/test/lazylead/postman_test.rb +32 -0
- data/test/lazylead/task/accuracy/accuracy_test.rb +48 -0
- data/test/lazylead/task/accuracy/records_test.rb +15 -0
- metadata +44 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc491194d58199a3949bbf63fb5dc6ea8a303dede1c5b646410fad4335e3363d
|
4
|
+
data.tar.gz: a451b8e278fa971abb3bd7453ab1d907d94a803a3fa3e42aca87dc7ab24687e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94c13ca434970b74119f1a8490110167e72cd384350f84fed34165af17062327ce0259696aa6b5f3e38a232595d169865f7f9231b995f430eaae319c0f3c15c1
|
7
|
+
data.tar.gz: bfb59ad495bf98f793400b0347951850cf556dfb055460bd6ec01e02947c6834c752343ada126f18f6c30dbe524ac51c004164082c455ad18f2add1f2e6d02ae
|
data/.docker/docker-compose.yml
CHANGED
@@ -5,19 +5,18 @@ services:
|
|
5
5
|
|
6
6
|
lazylead:
|
7
7
|
image: dgroup/lazylead:latest
|
8
|
-
container_name:
|
8
|
+
container_name: ll
|
9
9
|
mem_limit: 128m
|
10
10
|
build:
|
11
11
|
context: ../
|
12
12
|
dockerfile: .docker/Dockerfile
|
13
13
|
args:
|
14
|
-
release_tags: "latest 0.1.
|
15
|
-
version: "0.1.
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
- 1282:1282 # JMX connection for jvisualvm debug
|
14
|
+
release_tags: "latest 0.1.x"
|
15
|
+
version: "0.1.x"
|
16
|
+
environment:
|
17
|
+
jira_url: https://jira.spring.io
|
18
|
+
file_postman_dir: "logs"
|
20
19
|
volumes:
|
21
|
-
- .local
|
22
|
-
- .local
|
23
|
-
entrypoint: bin/lazylead --trace --verbose --log-file /lazylead/logs/ll{{.%Y-%m-%dT%H:%M:%S}}.log
|
20
|
+
- .local:/lazylead/db
|
21
|
+
- .local:/lazylead/logs
|
22
|
+
entrypoint: bin/lazylead --trace --verbose --log-file /lazylead/logs/ll{{.%Y-%m-%dT%H:%M:%S}}.log --sqlite db/ll.db
|
data/Rakefile
CHANGED
@@ -94,7 +94,7 @@ desc "Validate all XML/XSL/XSD/HTML files for formatting"
|
|
94
94
|
Xcop::RakeTask.new :xcop do |task|
|
95
95
|
task.license = "license.txt"
|
96
96
|
task.includes = %w[**/*.xml **/*.xsl **/*.xsd **/*.html]
|
97
|
-
task.excludes = %w[target/**/* coverage/**/* wp/**/*]
|
97
|
+
task.excludes = %w[target/**/* coverage/**/* wp/**/* test/resources/*]
|
98
98
|
end
|
99
99
|
|
100
100
|
# @todo #/DEV Enable rule "Checks SQL against the ANSI syntax" fully.
|
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.11.
|
35
|
+
s.version = "0.11.4"
|
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.11.
|
48
|
+
s.post_install_message = "Thanks for installing Lazylead v0.11.4!
|
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
|
@@ -58,7 +58,7 @@ tasks instead of solving technical problems."
|
|
58
58
|
s.add_runtime_dependency "activerecord", "6.1.3"
|
59
59
|
s.add_runtime_dependency "backtrace", "0.3"
|
60
60
|
s.add_runtime_dependency "colorize", "0.8.1"
|
61
|
-
s.add_runtime_dependency "faraday", "1.
|
61
|
+
s.add_runtime_dependency "faraday", "1.8.0"
|
62
62
|
s.add_runtime_dependency "get_process_mem", "0.2.7"
|
63
63
|
s.add_runtime_dependency "inifile", "3.0.0"
|
64
64
|
s.add_runtime_dependency "jira-ruby", "2.1.5"
|
@@ -77,9 +77,10 @@ tasks instead of solving technical problems."
|
|
77
77
|
s.add_runtime_dependency "tempfile", "0.1.1"
|
78
78
|
s.add_runtime_dependency "tilt", "2.0.10"
|
79
79
|
s.add_runtime_dependency "tzinfo", "2.0.4"
|
80
|
-
s.add_runtime_dependency "tzinfo-data", "1.2021.
|
80
|
+
s.add_runtime_dependency "tzinfo-data", "1.2021.2"
|
81
81
|
s.add_runtime_dependency "vcs4sql", "0.1.1"
|
82
82
|
s.add_runtime_dependency "viewpoint", "1.1.1"
|
83
|
+
s.add_runtime_dependency "zaru", "0.3.0"
|
83
84
|
s.add_development_dependency "codecov", "0.6.0"
|
84
85
|
s.add_development_dependency "guard", "2.18.0"
|
85
86
|
s.add_development_dependency "guard-minitest", "2.4.6"
|
@@ -91,12 +92,13 @@ tasks instead of solving technical problems."
|
|
91
92
|
s.add_development_dependency "rake", "13.0.6"
|
92
93
|
s.add_development_dependency "random-port", "0.5.1"
|
93
94
|
s.add_development_dependency "rdoc", "6.3.2"
|
94
|
-
s.add_development_dependency "rubocop", "1.
|
95
|
-
s.add_development_dependency "rubocop-minitest", "0.15.
|
95
|
+
s.add_development_dependency "rubocop", "1.22.0"
|
96
|
+
s.add_development_dependency "rubocop-minitest", "0.15.1"
|
96
97
|
s.add_development_dependency "rubocop-performance", "1.11.5"
|
97
98
|
s.add_development_dependency "rubocop-rake", "0.6.0"
|
98
|
-
s.add_development_dependency "rubocop-rspec", "2.
|
99
|
+
s.add_development_dependency "rubocop-rspec", "2.5.0"
|
100
|
+
s.add_development_dependency "ruby-prof", "1.4.3"
|
99
101
|
s.add_development_dependency "sqlint", "0.2.0"
|
100
102
|
s.add_development_dependency "tempfile", "0.1.1"
|
101
|
-
s.add_development_dependency "xcop", "0.6.
|
103
|
+
s.add_development_dependency "xcop", "0.6.3"
|
102
104
|
end
|
data/lib/lazylead/opts.rb
CHANGED
data/lib/lazylead/postman.rb
CHANGED
@@ -22,6 +22,8 @@
|
|
22
22
|
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
|
23
23
|
# OR OTHER DEALINGS IN THE SOFTWARE.
|
24
24
|
|
25
|
+
require "zaru"
|
26
|
+
require "colorize"
|
25
27
|
require_relative "log"
|
26
28
|
require_relative "email"
|
27
29
|
require_relative "version"
|
@@ -76,4 +78,62 @@ module Lazylead
|
|
76
78
|
mail
|
77
79
|
end
|
78
80
|
end
|
81
|
+
|
82
|
+
#
|
83
|
+
# A postman that sends emails to the std out.
|
84
|
+
#
|
85
|
+
class StdoutPostman
|
86
|
+
def initialize(log = Log.new)
|
87
|
+
@log = log
|
88
|
+
end
|
89
|
+
|
90
|
+
# Send an email.
|
91
|
+
# :opts :: the mail configuration like to, from, cc, subject, template.
|
92
|
+
def send(opts)
|
93
|
+
if opts.msg_to.empty?
|
94
|
+
p "Email can't be sent as 'to' is empty, more: '#{opts}'"
|
95
|
+
else
|
96
|
+
p "to=#{opts.msg_to}, from=#{opts.msg_from}, cc=#{opts.msg_cc}, " \
|
97
|
+
"subject=#{opts['subject']}, attachments=#{opts.msg_attachments}, body=#{opts.msg_body}"
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
#
|
103
|
+
# A postman that sends emails to the html file.
|
104
|
+
# Use ENV['file_postman_dir'] to set a root directory.
|
105
|
+
# By default
|
106
|
+
# ENV['file_postman_dir'] = "."
|
107
|
+
#
|
108
|
+
class FilePostman
|
109
|
+
def initialize(log = Log.new, env = ENV.to_h)
|
110
|
+
@log = log
|
111
|
+
@env = env
|
112
|
+
end
|
113
|
+
|
114
|
+
# Send an email.
|
115
|
+
# :opts :: the mail configuration like to, from, cc, subject, template.
|
116
|
+
def send(opts)
|
117
|
+
if opts.msg_to.empty?
|
118
|
+
@log.warn "ll-015: Email can't be sent as 'to' is empty, more: '#{opts}'"
|
119
|
+
else
|
120
|
+
file = filename(opts)
|
121
|
+
File.open(file, "w") do |f|
|
122
|
+
f.write "<!-- to=#{opts.msg_to}, from=#{opts.msg_from}, cc=#{opts.msg_cc}, " \
|
123
|
+
"subject=#{opts['subject']}, attachments=#{opts.msg_attachments} -->"
|
124
|
+
f.write opts.msg_body
|
125
|
+
end
|
126
|
+
@log.debug "Mail '#{opts['subject']}' for #{opts.msg_to} sent to " \
|
127
|
+
"'#{file.to_s.colorize(:light_blue)}'"
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
131
|
+
# Assemble file name where email to be print
|
132
|
+
def filename(opts)
|
133
|
+
File.join(
|
134
|
+
@env.fetch("file_postman_dir", "."),
|
135
|
+
Zaru.sanitize!("#{Time.now.nsec}-#{opts['subject']}.html")
|
136
|
+
)
|
137
|
+
end
|
138
|
+
end
|
79
139
|
end
|
data/lib/lazylead/schedule.rb
CHANGED
@@ -0,0 +1,24 @@
|
|
1
|
+
## Enable profiler
|
2
|
+
https://ruby-prof.github.io
|
3
|
+
```ruby
|
4
|
+
require 'ruby-prof'
|
5
|
+
alloc = RubyProf.profile(:track_allocations => true) do
|
6
|
+
# code
|
7
|
+
end
|
8
|
+
printer = RubyProf::MultiPrinter.new(alloc)
|
9
|
+
printer.print(:path => ".", :profile => "alloc")
|
10
|
+
```
|
11
|
+
|
12
|
+
## Jira allocation memory
|
13
|
+
Fields: `assignee,summary,priority,duedate,reporter`
|
14
|
+
|
15
|
+
| Tickets | Bytes | KB | MB |
|
16
|
+
| ------------- | :-------: | :-------: | :-------: |
|
17
|
+
| 1 | 40 | 0.03 | 0,00003 |
|
18
|
+
| 157 | 6280 | 6.13 | 0.59 |
|
19
|
+
| 4315 | 172600 | 168.55 | 0.16 |
|
20
|
+
| 10379 | 415160 | 405.42 | 0.39 |
|
21
|
+
|~10000 | ~400000 | ~390.625 | ~0.38 |
|
22
|
+
|
23
|
+
## GitHub allocation memory
|
24
|
+
TBD
|
data/lib/lazylead/system/jira.rb
CHANGED
@@ -64,11 +64,11 @@ module Lazylead
|
|
64
64
|
total = jira.Issue.jql(jql, max_results: 0)
|
65
65
|
@log.debug "Found #{total} ticket(s) in '#{jql}'"
|
66
66
|
loop do
|
67
|
-
tickets.concat(jira.Issue.jql(jql,
|
67
|
+
tickets.concat(jira.Issue.jql(jql, range(start, opts))
|
68
68
|
.map { |i| Lazylead::Issue.new(i, jira) })
|
69
69
|
@log.debug "Fetched #{tickets.size}"
|
70
|
-
start += opts.find(:max_results, 50)
|
71
|
-
break if (start > total) || (start >= opts.find(:limit, total))
|
70
|
+
start += opts.find(:max_results, 50).to_i
|
71
|
+
break if (start > total) || (start >= opts.find(:limit, total).to_i)
|
72
72
|
end
|
73
73
|
tickets
|
74
74
|
end
|
@@ -83,6 +83,26 @@ module Lazylead
|
|
83
83
|
|
84
84
|
private
|
85
85
|
|
86
|
+
# Detect tickets range in remote search result.
|
87
|
+
#
|
88
|
+
# In jira you may navigate through the search result using following parameters:
|
89
|
+
# https://docs.atlassian.com/jira-software/REST/7.3.1/#agile/1.0/epic-getIssuesForEpic
|
90
|
+
# :start_at
|
91
|
+
# The starting index of the returned issues. Base index: 0. See the 'Pagination' section at
|
92
|
+
# the top of this page for more details.
|
93
|
+
# :max_results
|
94
|
+
# The maximum number of issues to return per page. Default: 50. See the 'Pagination' section
|
95
|
+
# at the top of this page for more details. Note, the total number of issues returned is
|
96
|
+
# limited by the property 'jira.search.views.default.max' in your JIRA instance. If you
|
97
|
+
# exceed this limit, your results will be truncated.
|
98
|
+
def range(start, opts)
|
99
|
+
limit = opts.find(:limit, 0).to_i
|
100
|
+
max_results = opts.find(:max_results, 50).to_i
|
101
|
+
opts[:start_at] = start
|
102
|
+
opts[:max_results] = [limit, max_results].min if limit.positive?
|
103
|
+
opts
|
104
|
+
end
|
105
|
+
|
86
106
|
def client
|
87
107
|
return @client if defined? @client
|
88
108
|
@opts[:auth_type] = :basic if @opts[:auth_type].nil?
|
@@ -329,7 +349,7 @@ module Lazylead
|
|
329
349
|
extend Forwardable
|
330
350
|
def_delegators :@jira, :issues, :raw, :max_results, :limit
|
331
351
|
|
332
|
-
def initialize(url, path = "", log = Log.new)
|
352
|
+
def initialize(url, salt = NoSalt.new, path = "", log = Log.new)
|
333
353
|
@jira = Jira.new(
|
334
354
|
{
|
335
355
|
username: nil,
|
@@ -337,7 +357,7 @@ module Lazylead
|
|
337
357
|
site: url,
|
338
358
|
context_path: path
|
339
359
|
},
|
340
|
-
|
360
|
+
salt,
|
341
361
|
log
|
342
362
|
)
|
343
363
|
end
|
@@ -46,11 +46,17 @@ module Lazylead
|
|
46
46
|
|
47
47
|
def run(sys, postman, opts)
|
48
48
|
init_rules(opts)
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
49
|
+
tasks = sys.issues(opts["jql"], opts.jira_defaults.merge(expand: "changelog"))
|
50
|
+
.map { |i| Score.new(i, opts) }
|
51
|
+
.each do |s|
|
52
|
+
s.evaluate
|
53
|
+
s.post
|
54
|
+
end
|
55
|
+
unless tasks.empty? && tasks.size <= opts.fetch(:limit, 300).to_i
|
56
|
+
opts[:tickets] = tasks
|
57
|
+
postman.send(opts)
|
58
|
+
end
|
59
|
+
opts
|
54
60
|
end
|
55
61
|
|
56
62
|
# Initialize accuracy rules and configuration for tickets verification.
|
@@ -76,7 +82,7 @@ module Lazylead
|
|
76
82
|
# Accuracy is a percentage between current score and maximum possible value.
|
77
83
|
def evaluate(digits = 2)
|
78
84
|
@score = @opts[:rules].select { |r| r.passed(@issue) }.sum(&:score)
|
79
|
-
@accuracy = (score / @opts[:total] * 100).round(digits)
|
85
|
+
@accuracy = (@score.to_f / @opts[:total] * 100).round(digits)
|
80
86
|
self
|
81
87
|
end
|
82
88
|
|
@@ -34,14 +34,14 @@ module Lazylead
|
|
34
34
|
@ext = %w[.webm .mkv .flv .flv .vob .ogv .ogg .drc .gif .gifv .mng .avi
|
35
35
|
.mts .m2ts .ts .mov .qt .wmv .yuv .rm .rmvb .viv .asf .amv .mp4
|
36
36
|
.m4p .m4v .mpg .mp2 .mpeg .mpe .mpv .mpg .mpeg .m2v .m4v .svi
|
37
|
-
.3gp .3g2 .mxf .roq .nsv .flv .f4v .f4p .f4a .f4b .
|
37
|
+
.3gp .3g2 .mxf .roq .nsv .flv .f4v .f4p .f4a .f4b .wrf]
|
38
38
|
end
|
39
39
|
|
40
40
|
# Ensure that ticket has an attachment with video-file extension
|
41
41
|
def matches?(attach)
|
42
42
|
return true if @ext.any? { |e| e.eql? File.extname(attach.attrs["filename"]).downcase }
|
43
43
|
return false if attach.attrs["mimeType"].nil?
|
44
|
-
@ext.any? { |e| attach.attrs["mimeType"].
|
44
|
+
@ext.any? { |e| attach.attrs["mimeType"].end_with? "/#{e[1..]}" }
|
45
45
|
end
|
46
46
|
end
|
47
47
|
end
|
@@ -51,7 +51,7 @@ module Lazylead
|
|
51
51
|
.to_enum(:scan, /!.+!/)
|
52
52
|
.map { Regexp.last_match }
|
53
53
|
.map(&:to_s)
|
54
|
-
.
|
54
|
+
.grep_v(%r{(http|https)://.*/images/icons/link_attachment.*.gif})
|
55
55
|
end
|
56
56
|
|
57
57
|
# Detect all pictures in ticket attachments and returns an array with file names.
|
data/lib/lazylead/version.rb
CHANGED
data/readme.md
CHANGED
@@ -19,8 +19,6 @@
|
|
19
19
|
[![DevOps By Rultor.com](http://www.rultor.com/b/dgroup/lazylead)](http://www.rultor.com/p/dgroup/lazylead)
|
20
20
|
[![EO badge](http://www.elegantobjects.org/badge.svg)](http://www.elegantobjects.org/#principles)
|
21
21
|
|
22
|
-
⚠️ We're still in a very early alpha version, the API may change frequently until we release version `1.0`.
|
23
|
-
|
24
22
|
### Overview
|
25
23
|
Ticketing systems (Github, Jira, etc.) are strongly integrated into our processes and everyone understands their necessity. As soon as a developer becomes a lead/technical manager, he or she faces a set of routine tasks that are related to ticketing work. On large projects this becomes a problem, more and more you spend time running around on dashboards and tickets, looking for incorrect deviations in tickets and performing routine tasks instead of solving technical problems.
|
26
24
|
|
@@ -28,35 +26,35 @@ The idea of automatic management is not new, for example [Zerocracy](https://www
|
|
28
26
|
I like this idea, but large companies/projects are not ready yet for such a decisive breakthrough and need step-by-step solutions such as [lazylead](https://github.com/dgroup/lazylead).
|
29
27
|
I think you remember how [static code analysis](https://en.wikipedia.org/wiki/Static_program_analysis) treated at in the past; today we have a huge toolkit (pmd, checkstyle, qulice, rubocop, peon, etc) for each language that allows you to avoid routine issues and remove from the code reviewer the unnecessary load.
|
30
28
|
|
31
|
-
Join our telegram
|
32
|
-
|
33
|
-
| Daily annoying task | Jira | Github | Trello | SVN |
|
34
|
-
| :---------------------------------------------------------------------------------- | :---: | :----: | :----: | :----: |
|
35
|
-
| [Notify ticket's assignee](lib/lazylead/task/alert/alert.rb) | ✅ | ⌛ | ⌛ | ❌ |
|
36
|
-
| [Notify ticket's reporter](lib/lazylead/task/alert/alert.rb) | ✅ | ⌛ | ⌛ | ❌ |
|
37
|
-
| [Notify ticket's manager](lib/lazylead/task/alert/alert.rb) | ✅ | ⌛ | ⌛ | ❌ |
|
38
|
-
| [Notify about illegal "Fix Version" modification](lib/lazylead/task/fix_version.rb) | ✅ | ❌ | ❌ | ❌ |
|
39
|
-
| [Expected comment in ticket is missing](lib/lazylead/task/missing_comment.rb) | ✅ | ⌛ | ⌛ | ❌ |
|
40
|
-
| [Propagate some fields from parent ticket into sub-tasks](.docs/propagate_down.md) | ✅ | ❌ | ❌ | ❌ |
|
41
|
-
| [Evaluate the ticket formatting accuracy](.docs/accuracy.md) | ✅ | ⌛ | ⌛ | ❌ |
|
42
|
-
| Print the current capacity of team into newly created tasks | ⌛ | ⌛ | ⌛ | ❌ |
|
43
|
-
| Create/retrofit the defect automatically into latest release | ⌛ | ⌛ | ❌ | ❌ |
|
44
|
-
| [Notify about expired(ing) due dates](.docs/duedate_expired.md) | ✅ | ❌ | ⌛ | ❌ |
|
45
|
-
| Notify about absent original estimations | ⌛ | ⌛ | ⌛ | ❌ |
|
46
|
-
| Notify about 'Hot potato' tickets | ⌛ | ⌛ | ⌛ | ❌ |
|
47
|
-
| Notify about long live tickets (aging) | ⌛ | ⌛ | ⌛ | ❌ |
|
48
|
-
| Create a meeting(s) automatically in case some tickets appeared (group by assignee/reporters/component/ticket type/etc) | ⌛ | ⌛ | ⌛ | ❌ |
|
49
|
-
| Propogate fields from parent tickets to sub-tasks | ✅ | ⌛ | ⌛ | ❌ |
|
50
|
-
| Notify about tickets without comments with expected text | ✅ | ⌛ | ⌛ | ❌ |
|
51
|
-
| [Notify about team loading (no tasks on teammates)](lib/lazylead/task/loading.rb) | ✅ | ⌛ | ⌛ | ❌ |
|
52
|
-
| Notify about tickets matches predefined multiple conditions | ✅ | ⌛ | ⌛ | ❌ |
|
53
|
-
| Link automatically the ticket and Confluence page if link found in ticket's comments/description | ✅ | ⌛ | ⌛ | ❌ |
|
54
|
-
| Notify about tickets assigned to your team members not by effective managers| ✅ | ⌛ | ⌛ | ❌ |
|
55
|
-
| Notify about modifications of important files in VCS | ❌ | ⌛ | ❌ | ✅ |
|
56
|
-
| Notify about diff changes for past X period in VCS | ❌ | ⌛ | ❌ | ✅ |
|
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)| ✅ | ⌛ | ❌ | ❌ |
|
29
|
+
Join our telegram chat [lazylead](https://t.me/lazyleads) for discussions.
|
30
|
+
|
31
|
+
| Daily annoying task | Jira | Github | Trello | SVN | Git |
|
32
|
+
| :---------------------------------------------------------------------------------- | :---: | :----: | :----: | :----: | :----: |
|
33
|
+
| [Notify ticket's assignee](lib/lazylead/task/alert/alert.rb) | ✅ | ⌛ | ⌛ | ❌ | ❌ |
|
34
|
+
| [Notify ticket's reporter](lib/lazylead/task/alert/alert.rb) | ✅ | ⌛ | ⌛ | ❌ | ❌ |
|
35
|
+
| [Notify ticket's manager](lib/lazylead/task/alert/alert.rb) | ✅ | ⌛ | ⌛ | ❌ | ❌ |
|
36
|
+
| [Notify about illegal "Fix Version" modification](lib/lazylead/task/fix_version.rb) | ✅ | ❌ | ❌ | ❌ | ❌ |
|
37
|
+
| [Expected comment in ticket is missing](lib/lazylead/task/missing_comment.rb) | ✅ | ⌛ | ⌛ | ❌ | ❌ |
|
38
|
+
| [Propagate some fields from parent ticket into sub-tasks](.docs/propagate_down.md) | ✅ | ❌ | ❌ | ❌ | ❌ |
|
39
|
+
| [Evaluate the ticket formatting accuracy](.docs/accuracy.md) | ✅ | ⌛ | ⌛ | ❌ | ❌ |
|
40
|
+
| Print the current capacity of team into newly created tasks | ⌛ | ⌛ | ⌛ | ❌ | ❌ |
|
41
|
+
| Create/retrofit the defect automatically into latest release | ⌛ | ⌛ | ❌ | ❌ | ❌ |
|
42
|
+
| [Notify about expired(ing) due dates](.docs/duedate_expired.md) | ✅ | ❌ | ⌛ | ❌ | ❌ |
|
43
|
+
| Notify about absent original estimations | ⌛ | ⌛ | ⌛ | ❌ | ❌ |
|
44
|
+
| Notify about 'Hot potato' tickets | ⌛ | ⌛ | ⌛ | ❌ | ❌ |
|
45
|
+
| Notify about long live tickets (aging) | ⌛ | ⌛ | ⌛ | ❌ | ❌ |
|
46
|
+
| Create a meeting(s) automatically in case some tickets appeared (group by assignee/reporters/component/ticket type/etc) | ⌛ | ⌛ | ⌛ | ❌ | ❌ |
|
47
|
+
| Propogate fields from parent tickets to sub-tasks | ✅ | ⌛ | ⌛ | ❌ | ❌ |
|
48
|
+
| Notify about tickets without comments with expected text | ✅ | ⌛ | ⌛ | ❌ | ❌ |
|
49
|
+
| [Notify about team loading (no tasks on teammates)](lib/lazylead/task/loading.rb) | ✅ | ⌛ | ⌛ | ❌ | ❌ |
|
50
|
+
| Notify about tickets matches predefined multiple conditions | ✅ | ⌛ | ⌛ | ❌ | ❌ |
|
51
|
+
| Link automatically the ticket and Confluence page if link found in ticket's comments/description | ✅ | ⌛ | ⌛ | ❌ | ❌ |
|
52
|
+
| Notify about tickets assigned to your team members not by effective managers| ✅ | ⌛ | ⌛ | ❌ | ❌ |
|
53
|
+
| Notify about modifications of important files in VCS | ❌ | ⌛ | ❌ | ✅ | ⌛ |
|
54
|
+
| Notify about diff changes for past X period in VCS | ❌ | ⌛ | ❌ | ✅ | ⌛ |
|
55
|
+
| Notify about changes with some text for past X period in VCS | ❌ | ⌛ | ❌ | ✅ | ⌛ |
|
56
|
+
| [Notify when someone outside of your team changed the due date on tickets for your team](lib/lazylead/task/micromanager.rb)| ✅ | ⌛ | ❌ | ❌ | ❌ |
|
57
|
+
| [Notify when someone outside of your team assigned a ticket directly to the developer](lib/lazylead/task/assignment.rb)| ✅ | ⌛ | ❌ | ❌ | ❌ |
|
60
58
|
|
61
59
|
| Integration | Type | Status |
|
62
60
|
| :---------------------------------------------------- | :-----------: | :----: |
|
@@ -183,6 +181,3 @@ For simplicity, we are using [docker-compose](https://docs.docker.com/compose/):
|
|
183
181
|
rake -A
|
184
182
|
```
|
185
183
|
Everyone interacting in this project’s codebases, issue trackers, chat rooms is expected to follow the [code of conduct](.github/CODE_OF_CONDUCT.md).
|
186
|
-
|
187
|
-
Contributors:
|
188
|
-
* [dgroup](https://github.com/dgroup) as Yurii Dubinka ([yurii.dubinka@gmail.com](mailto:yurii.dubinka@gmail.com))
|
@@ -57,4 +57,36 @@ module Lazylead
|
|
57
57
|
)
|
58
58
|
end
|
59
59
|
end
|
60
|
+
|
61
|
+
class StdoutPostmanTest < Lazylead::Test
|
62
|
+
# @todo #495/DEV Find way to capture the STDOUT in order to test the email sending.
|
63
|
+
# Right now its just visual verification.
|
64
|
+
test "send email to stdout" do
|
65
|
+
StdoutPostman.new.send(
|
66
|
+
Opts.new(
|
67
|
+
"to" => "to@email.com",
|
68
|
+
"from" => "from@email.com",
|
69
|
+
"attachments" => ["readme.md"],
|
70
|
+
"subject" => "[LL] Attachments",
|
71
|
+
"template" => "lib/messages/savepoint.erb"
|
72
|
+
)
|
73
|
+
)
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
class FilePostmanTest < Lazylead::Test
|
78
|
+
# @todo #/DEV add new assert method which consume the file name and check existence on the disk
|
79
|
+
test "send email to html file" do
|
80
|
+
FilePostman.new(Log.new, "file_postman_dir" => "test/resources")
|
81
|
+
.send(
|
82
|
+
Opts.new(
|
83
|
+
"to" => "to@email.com",
|
84
|
+
"from" => "from@email.com",
|
85
|
+
"attachments" => ["readme.md"],
|
86
|
+
"subject" => "[LL] Attachments",
|
87
|
+
"template" => "lib/messages/savepoint.erb"
|
88
|
+
)
|
89
|
+
)
|
90
|
+
end
|
91
|
+
end
|
60
92
|
end
|
@@ -74,5 +74,53 @@ module Lazylead
|
|
74
74
|
assert_kind_of Lazylead::Task::Accuracy,
|
75
75
|
ORM::Task.find(195).action.constantize.new
|
76
76
|
end
|
77
|
+
|
78
|
+
test "one ticket found" do
|
79
|
+
Lazylead::Smtp.new.enable
|
80
|
+
assert_equal 1,
|
81
|
+
Task::Accuracy.new.run(
|
82
|
+
NoAuthJira.new("https://jira.spring.io"),
|
83
|
+
Postman.new,
|
84
|
+
Opts.new(
|
85
|
+
"from" => "ll@fake.com",
|
86
|
+
"to" => "lead@fake.com",
|
87
|
+
"rules" => "Lazylead::AffectedBuild",
|
88
|
+
"silent" => "true",
|
89
|
+
"colors" => {
|
90
|
+
"0" => "#FF4F33",
|
91
|
+
"57" => "#19DD1E"
|
92
|
+
}.to_json.to_s,
|
93
|
+
"jql" => "key > DATAJDBC-490",
|
94
|
+
"limit" => "1",
|
95
|
+
"subject" => "[LL] Raised tickets",
|
96
|
+
"template" => "lib/messages/accuracy.erb"
|
97
|
+
)
|
98
|
+
)[:tickets].size
|
99
|
+
end
|
100
|
+
|
101
|
+
test "score is correct" do
|
102
|
+
Lazylead::Smtp.new.enable
|
103
|
+
Task::Accuracy.new.run(
|
104
|
+
NoAuthJira.new("https://jira.spring.io"),
|
105
|
+
Postman.new,
|
106
|
+
Opts.new(
|
107
|
+
"from" => "ll@fake.com",
|
108
|
+
"to" => "lead@fake.com",
|
109
|
+
"rules" => "Lazylead::Stacktrace,Lazylead::Testcase",
|
110
|
+
"fields" => "attachment,description,reporter,priority,duedate,summary",
|
111
|
+
"colors" => {
|
112
|
+
"0" => "#FF4F33",
|
113
|
+
"30" => "#FEC15E",
|
114
|
+
"50" => "#19DD1E"
|
115
|
+
}.to_json.to_s,
|
116
|
+
"jql" => "key=DATAMONGO-1532",
|
117
|
+
"silent" => "true",
|
118
|
+
"subject" => "[LL] Check DATAMONGO-1532",
|
119
|
+
"template" => "lib/messages/accuracy.erb"
|
120
|
+
)
|
121
|
+
)
|
122
|
+
assert_email "[LL] Check DATAMONGO-1532",
|
123
|
+
"DATAMONGO-1532", "3", "42.86%"
|
124
|
+
end
|
77
125
|
end
|
78
126
|
end
|
@@ -72,5 +72,20 @@ module Lazylead
|
|
72
72
|
)
|
73
73
|
)
|
74
74
|
end
|
75
|
+
|
76
|
+
test "mime type is xlsx" do
|
77
|
+
refute Records.new.passed(
|
78
|
+
OpenStruct.new(
|
79
|
+
attachments: [
|
80
|
+
OpenStruct.new(
|
81
|
+
attrs: {
|
82
|
+
"filename" => "snapshot.xlsx",
|
83
|
+
"mimeType" => "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
84
|
+
}
|
85
|
+
)
|
86
|
+
]
|
87
|
+
)
|
88
|
+
)
|
89
|
+
end
|
75
90
|
end
|
76
91
|
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.11.
|
4
|
+
version: 0.11.4
|
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-
|
11
|
+
date: 2021-10-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - '='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 1.
|
61
|
+
version: 1.8.0
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - '='
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 1.
|
68
|
+
version: 1.8.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: get_process_mem
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -324,14 +324,14 @@ dependencies:
|
|
324
324
|
requirements:
|
325
325
|
- - '='
|
326
326
|
- !ruby/object:Gem::Version
|
327
|
-
version: 1.2021.
|
327
|
+
version: 1.2021.2
|
328
328
|
type: :runtime
|
329
329
|
prerelease: false
|
330
330
|
version_requirements: !ruby/object:Gem::Requirement
|
331
331
|
requirements:
|
332
332
|
- - '='
|
333
333
|
- !ruby/object:Gem::Version
|
334
|
-
version: 1.2021.
|
334
|
+
version: 1.2021.2
|
335
335
|
- !ruby/object:Gem::Dependency
|
336
336
|
name: vcs4sql
|
337
337
|
requirement: !ruby/object:Gem::Requirement
|
@@ -360,6 +360,20 @@ dependencies:
|
|
360
360
|
- - '='
|
361
361
|
- !ruby/object:Gem::Version
|
362
362
|
version: 1.1.1
|
363
|
+
- !ruby/object:Gem::Dependency
|
364
|
+
name: zaru
|
365
|
+
requirement: !ruby/object:Gem::Requirement
|
366
|
+
requirements:
|
367
|
+
- - '='
|
368
|
+
- !ruby/object:Gem::Version
|
369
|
+
version: 0.3.0
|
370
|
+
type: :runtime
|
371
|
+
prerelease: false
|
372
|
+
version_requirements: !ruby/object:Gem::Requirement
|
373
|
+
requirements:
|
374
|
+
- - '='
|
375
|
+
- !ruby/object:Gem::Version
|
376
|
+
version: 0.3.0
|
363
377
|
- !ruby/object:Gem::Dependency
|
364
378
|
name: codecov
|
365
379
|
requirement: !ruby/object:Gem::Requirement
|
@@ -520,28 +534,28 @@ dependencies:
|
|
520
534
|
requirements:
|
521
535
|
- - '='
|
522
536
|
- !ruby/object:Gem::Version
|
523
|
-
version: 1.
|
537
|
+
version: 1.22.0
|
524
538
|
type: :development
|
525
539
|
prerelease: false
|
526
540
|
version_requirements: !ruby/object:Gem::Requirement
|
527
541
|
requirements:
|
528
542
|
- - '='
|
529
543
|
- !ruby/object:Gem::Version
|
530
|
-
version: 1.
|
544
|
+
version: 1.22.0
|
531
545
|
- !ruby/object:Gem::Dependency
|
532
546
|
name: rubocop-minitest
|
533
547
|
requirement: !ruby/object:Gem::Requirement
|
534
548
|
requirements:
|
535
549
|
- - '='
|
536
550
|
- !ruby/object:Gem::Version
|
537
|
-
version: 0.15.
|
551
|
+
version: 0.15.1
|
538
552
|
type: :development
|
539
553
|
prerelease: false
|
540
554
|
version_requirements: !ruby/object:Gem::Requirement
|
541
555
|
requirements:
|
542
556
|
- - '='
|
543
557
|
- !ruby/object:Gem::Version
|
544
|
-
version: 0.15.
|
558
|
+
version: 0.15.1
|
545
559
|
- !ruby/object:Gem::Dependency
|
546
560
|
name: rubocop-performance
|
547
561
|
requirement: !ruby/object:Gem::Requirement
|
@@ -576,14 +590,28 @@ dependencies:
|
|
576
590
|
requirements:
|
577
591
|
- - '='
|
578
592
|
- !ruby/object:Gem::Version
|
579
|
-
version: 2.
|
593
|
+
version: 2.5.0
|
594
|
+
type: :development
|
595
|
+
prerelease: false
|
596
|
+
version_requirements: !ruby/object:Gem::Requirement
|
597
|
+
requirements:
|
598
|
+
- - '='
|
599
|
+
- !ruby/object:Gem::Version
|
600
|
+
version: 2.5.0
|
601
|
+
- !ruby/object:Gem::Dependency
|
602
|
+
name: ruby-prof
|
603
|
+
requirement: !ruby/object:Gem::Requirement
|
604
|
+
requirements:
|
605
|
+
- - '='
|
606
|
+
- !ruby/object:Gem::Version
|
607
|
+
version: 1.4.3
|
580
608
|
type: :development
|
581
609
|
prerelease: false
|
582
610
|
version_requirements: !ruby/object:Gem::Requirement
|
583
611
|
requirements:
|
584
612
|
- - '='
|
585
613
|
- !ruby/object:Gem::Version
|
586
|
-
version:
|
614
|
+
version: 1.4.3
|
587
615
|
- !ruby/object:Gem::Dependency
|
588
616
|
name: sqlint
|
589
617
|
requirement: !ruby/object:Gem::Requirement
|
@@ -618,14 +646,14 @@ dependencies:
|
|
618
646
|
requirements:
|
619
647
|
- - '='
|
620
648
|
- !ruby/object:Gem::Version
|
621
|
-
version: 0.6.
|
649
|
+
version: 0.6.3
|
622
650
|
type: :development
|
623
651
|
prerelease: false
|
624
652
|
version_requirements: !ruby/object:Gem::Requirement
|
625
653
|
requirements:
|
626
654
|
- - '='
|
627
655
|
- !ruby/object:Gem::Version
|
628
|
-
version: 0.6.
|
656
|
+
version: 0.6.3
|
629
657
|
description: |-
|
630
658
|
Ticketing systems (Github, Jira, etc.) are strongly
|
631
659
|
integrated into our processes and everyone understands their necessity. As soon
|
@@ -700,6 +728,7 @@ files:
|
|
700
728
|
- lib/lazylead/salt.rb
|
701
729
|
- lib/lazylead/schedule.rb
|
702
730
|
- lib/lazylead/smtp.rb
|
731
|
+
- lib/lazylead/system/allocations.md
|
703
732
|
- lib/lazylead/system/empty.rb
|
704
733
|
- lib/lazylead/system/fake.rb
|
705
734
|
- lib/lazylead/system/jira.rb
|
@@ -815,7 +844,7 @@ licenses:
|
|
815
844
|
- MIT
|
816
845
|
metadata: {}
|
817
846
|
post_install_message: |-
|
818
|
-
Thanks for installing Lazylead v0.11.
|
847
|
+
Thanks for installing Lazylead v0.11.4!
|
819
848
|
Read our blog posts: https://lazylead.org
|
820
849
|
Stay in touch with the community in Telegram: https://t.me/lazylead
|
821
850
|
Follow us on Twitter: https://twitter.com/lazylead
|