lazylead 0.11.0 → 0.11.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lazylead.gemspec +3 -3
- data/lib/lazylead/opts.rb +2 -1
- data/lib/lazylead/system/jira.rb +23 -3
- data/lib/lazylead/task/accuracy/accuracy.rb +1 -0
- data/lib/lazylead/version.rb +1 -1
- data/test/lazylead/task/accuracy/accuracy_test.rb +23 -0
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 333915b333e6a6ed286d3ee7e5b984b30ec77745195d0a522b38453c8946bddd
|
4
|
+
data.tar.gz: 3ad06509a4714b6317a0f013f61a74e3c3de05b58c424de6faf435fe877c7079
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db6709844e1f8175a32fadef567cc661d469ce2fd6fbd69050726bb9d0368e41133765b730c4efb5da353c074db2d9a875e51dfffa3e408b65279a13e7f33b33
|
7
|
+
data.tar.gz: 2189335ff6852e008d489d582653de84653413396283e92724e7ae2c058549dc8a7d0d11d13f431020ec62517179bcab758b05571aa5067a614f64a4f86116d2
|
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.1"
|
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.1!
|
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
|
@@ -98,5 +98,5 @@ tasks instead of solving technical problems."
|
|
98
98
|
s.add_development_dependency "rubocop-rspec", "2.4.0"
|
99
99
|
s.add_development_dependency "sqlint", "0.2.0"
|
100
100
|
s.add_development_dependency "tempfile", "0.1.1"
|
101
|
-
s.add_development_dependency "xcop", "0.6.
|
101
|
+
s.add_development_dependency "xcop", "0.6.3"
|
102
102
|
end
|
data/lib/lazylead/opts.rb
CHANGED
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?
|
data/lib/lazylead/version.rb
CHANGED
@@ -74,5 +74,28 @@ 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
|
77
100
|
end
|
78
101
|
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.1
|
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-09-
|
11
|
+
date: 2021-09-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -618,14 +618,14 @@ dependencies:
|
|
618
618
|
requirements:
|
619
619
|
- - '='
|
620
620
|
- !ruby/object:Gem::Version
|
621
|
-
version: 0.6.
|
621
|
+
version: 0.6.3
|
622
622
|
type: :development
|
623
623
|
prerelease: false
|
624
624
|
version_requirements: !ruby/object:Gem::Requirement
|
625
625
|
requirements:
|
626
626
|
- - '='
|
627
627
|
- !ruby/object:Gem::Version
|
628
|
-
version: 0.6.
|
628
|
+
version: 0.6.3
|
629
629
|
description: |-
|
630
630
|
Ticketing systems (Github, Jira, etc.) are strongly
|
631
631
|
integrated into our processes and everyone understands their necessity. As soon
|
@@ -815,7 +815,7 @@ licenses:
|
|
815
815
|
- MIT
|
816
816
|
metadata: {}
|
817
817
|
post_install_message: |-
|
818
|
-
Thanks for installing Lazylead v0.11.
|
818
|
+
Thanks for installing Lazylead v0.11.1!
|
819
819
|
Read our blog posts: https://lazylead.org
|
820
820
|
Stay in touch with the community in Telegram: https://t.me/lazylead
|
821
821
|
Follow us on Twitter: https://twitter.com/lazylead
|