shiftzilla 0.2.30 → 0.2.31
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/shiftzilla/bug.rb +28 -28
- data/lib/shiftzilla/org_data.rb +14 -13
- data/lib/shiftzilla/source.rb +25 -1
- data/lib/shiftzilla/version.rb +1 -1
- data/{shiftzilla_cfg.yml.tmpl → shiftzilla_cfg.yaml.tmpl} +0 -0
- data/template.haml +5 -5
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 31c2e44b571b53ef99faa54d3c5e6b54e4557143fe9f40f70bc45b4124872892
|
4
|
+
data.tar.gz: 9354388b6fc4a651aa283db031af0c29073b2e78094982c0e08a9f2f7ce6f672
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 213b09d6780afa354c2d7e020ac369432c01a20fdeab2229c87f542084df504204a7410732edd1b49325e82b997fa54852991fabff391adac5eb39eca69997b3
|
7
|
+
data.tar.gz: b4fdff84e4f84291a1c832777ba872a52a88479bbdc427c8c7122490f8b6d5f8bfe837e053fe5dd44ffa981e4ce3b00d5cd69082d861c8d3a91f9d1e3ae05daf
|
data/lib/shiftzilla/bug.rb
CHANGED
@@ -1,37 +1,37 @@
|
|
1
1
|
module Shiftzilla
|
2
2
|
class Bug
|
3
|
-
attr_reader :id, :first_seen, :last_seen, :
|
3
|
+
attr_reader :id, :first_seen, :last_seen, :blocker_plus, :blocker_unknown, :test_blocker, :ops_blocker, :owner, :component, :pm_score, :cust_cases, :tgt_release, :summary, :status
|
4
4
|
|
5
5
|
def initialize(bzid,binfo)
|
6
|
-
@id
|
7
|
-
@first_seen
|
8
|
-
@last_seen
|
9
|
-
@
|
10
|
-
@
|
11
|
-
@
|
12
|
-
@
|
13
|
-
@owner
|
14
|
-
@summary
|
15
|
-
@status
|
16
|
-
@component
|
17
|
-
@pm_score
|
18
|
-
@cust_cases
|
19
|
-
@tgt_release
|
6
|
+
@id = bzid
|
7
|
+
@first_seen = binfo[:snapdate]
|
8
|
+
@last_seen = binfo[:snapdate]
|
9
|
+
@blocker_plus = binfo[:blocker_plus]
|
10
|
+
@blocker_unknown = binfo[:blocker_unknown]
|
11
|
+
@test_blocker = binfo[:test_blocker]
|
12
|
+
@ops_blocker = binfo[:ops_blocker]
|
13
|
+
@owner = binfo[:owner]
|
14
|
+
@summary = binfo[:summary]
|
15
|
+
@status = binfo[:status]
|
16
|
+
@component = binfo[:component]
|
17
|
+
@pm_score = binfo[:pm_score]
|
18
|
+
@cust_cases = binfo[:cust_cases]
|
19
|
+
@tgt_release = binfo[:tgt_release]
|
20
20
|
end
|
21
21
|
|
22
22
|
def update(binfo)
|
23
|
-
@last_seen
|
24
|
-
@
|
25
|
-
@
|
26
|
-
@
|
27
|
-
@
|
28
|
-
@owner
|
29
|
-
@summary
|
30
|
-
@status
|
31
|
-
@component
|
32
|
-
@pm_score
|
33
|
-
@cust_cases
|
34
|
-
@tgt_release
|
23
|
+
@last_seen = binfo[:snapdate]
|
24
|
+
@blocker_plus = binfo[:blocker_plus]
|
25
|
+
@blocker_unknown = binfo[:blocker_unknown]
|
26
|
+
@test_blocker = binfo[:test_blocker]
|
27
|
+
@ops_blocker = binfo[:ops_blocker]
|
28
|
+
@owner = binfo[:owner]
|
29
|
+
@summary = binfo[:summary]
|
30
|
+
@status = binfo[:status]
|
31
|
+
@component = binfo[:component]
|
32
|
+
@pm_score = binfo[:pm_score]
|
33
|
+
@cust_cases = binfo[:cust_cases]
|
34
|
+
@tgt_release = binfo[:tgt_release]
|
35
35
|
end
|
36
36
|
|
37
37
|
def age
|
@@ -66,4 +66,4 @@ module Shiftzilla
|
|
66
66
|
val.to_f.to_s == val.to_s || val.to_i.to_s == val.to_s
|
67
67
|
end
|
68
68
|
end
|
69
|
-
end
|
69
|
+
end
|
data/lib/shiftzilla/org_data.rb
CHANGED
@@ -47,18 +47,18 @@ module Shiftzilla
|
|
47
47
|
|
48
48
|
# Package up bug data
|
49
49
|
binfo = {
|
50
|
-
:snapdate
|
51
|
-
:
|
52
|
-
:
|
53
|
-
:
|
54
|
-
:
|
55
|
-
:owner
|
56
|
-
:summary
|
57
|
-
:status
|
58
|
-
:component
|
59
|
-
:pm_score
|
60
|
-
:cust_cases
|
61
|
-
:tgt_release
|
50
|
+
:snapdate => snapdate,
|
51
|
+
:blocker_plus => keyw.include?('blocker+'),
|
52
|
+
:blocker_unknown => keyw.include?('blocker?'),
|
53
|
+
:test_blocker => keyw.include?('TestBlocker'),
|
54
|
+
:ops_blocker => keyw.include?('ServiceDeliveryBlocker'),
|
55
|
+
:owner => owns,
|
56
|
+
:summary => summ,
|
57
|
+
:status => stat,
|
58
|
+
:component => comp,
|
59
|
+
:pm_score => pmsc,
|
60
|
+
:cust_cases => (cust == 1),
|
61
|
+
:tgt_release => tgtr,
|
62
62
|
}
|
63
63
|
|
64
64
|
tgt_release = @config.release_by_target(tgtr)
|
@@ -104,7 +104,8 @@ module Shiftzilla
|
|
104
104
|
|
105
105
|
# Add info to the snapshot
|
106
106
|
snapdata.bug_ids << bzid
|
107
|
-
|
107
|
+
# Only the blocker+ flag counts as a blocker for snapshots
|
108
|
+
if bug.blocker_plus
|
108
109
|
snapdata.tb_ids << bzid
|
109
110
|
end
|
110
111
|
if bug.cust_cases
|
data/lib/shiftzilla/source.rb
CHANGED
@@ -25,7 +25,9 @@ module Shiftzilla
|
|
25
25
|
output_format = @fields.map{ |fld| "%{#{fld.to_s}}" }.join("\x1F")
|
26
26
|
table_fields = @fields.map{ |fld| "\"#{field_map[fld]}\"" }.join(',')
|
27
27
|
insert_frame = @fields.map{ |fld| '?' }.join(', ')
|
28
|
-
|
28
|
+
# Also grabs the flags to check for the blocker flag, this is dropped before inserting into the db
|
29
|
+
bz_command = "bugzilla query --savedsearch #{@search} --savedsearch-sharer-id=#{@sharer} --outputformat='#{output_format}\x1F%{flags}flags||EOR'"
|
30
|
+
|
29
31
|
bz_csv = `#{bz_command}`
|
30
32
|
retrieved = []
|
31
33
|
bz_csv.split("||EOR\n").each do |row|
|
@@ -47,6 +49,28 @@ module Shiftzilla
|
|
47
49
|
values[@external_bugs_idx] = 0
|
48
50
|
end
|
49
51
|
end
|
52
|
+
|
53
|
+
# Check for blocker+ flag and stub it as a keyword
|
54
|
+
if not values[-1].nil? and values[-1].include?("blocker+")
|
55
|
+
keyword_idx = @fields.index(:keywords)
|
56
|
+
if not values[keyword_idx]
|
57
|
+
values[keyword_idx] = "blocker+"
|
58
|
+
else
|
59
|
+
values[keyword_idx] = values[keyword_idx] + ",blocker+"
|
60
|
+
end
|
61
|
+
end
|
62
|
+
# Check for blocker? flag and stub it as a keyword
|
63
|
+
if not values[-1].nil? and values[-1].include?("blocker?")
|
64
|
+
keyword_idx = @fields.index(:keywords)
|
65
|
+
if not values[keyword_idx]
|
66
|
+
values[keyword_idx] = "blocker?"
|
67
|
+
else
|
68
|
+
values[keyword_idx] = values[keyword_idx] + ",blocker?"
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
# Remove flags, which is always the final value
|
73
|
+
values = values[0...-2]
|
50
74
|
retrieved << values
|
51
75
|
end
|
52
76
|
puts "Retrieved #{retrieved.length} rows"
|
data/lib/shiftzilla/version.rb
CHANGED
File without changes
|
data/template.haml
CHANGED
@@ -153,7 +153,7 @@
|
|
153
153
|
%thead
|
154
154
|
%tr
|
155
155
|
%th
|
156
|
-
%abbr{ :title => '
|
156
|
+
%abbr{ :title => 'Blocker flags and keywords' } Blocker
|
157
157
|
%th
|
158
158
|
%abbr{ :title => 'See https://mojo.redhat.com/docs/DOC-1159309' } PM
|
159
159
|
%th
|
@@ -169,10 +169,10 @@
|
|
169
169
|
- all_bugs.each do |b|
|
170
170
|
%tr
|
171
171
|
%td
|
172
|
-
= b.
|
173
|
-
= b.
|
174
|
-
= b.
|
175
|
-
= b.
|
172
|
+
= b.blocker_plus ? "<span class='badge badge-danger'>Βlocker+</span>" : ''
|
173
|
+
= b.blocker_unknown ? "<span class='badge badge-info'>blocker?</span>" : ''
|
174
|
+
= b.test_blocker ? "<span class='badge badge-warning'>Test</span>" : ''
|
175
|
+
= b.ops_blocker ? "<span class='badge badge-dark'>SD</span>" : ''
|
176
176
|
%td= b.pm_score
|
177
177
|
%td= b.cust_cases ? "<span class='badge badge-warning'>CC</span>" : ''
|
178
178
|
%td(data-order="#{b.semver}")= b.tgt_release
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shiftzilla
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.31
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- N. Harrison Ripps
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-
|
12
|
+
date: 2020-11-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -184,7 +184,7 @@ files:
|
|
184
184
|
- lib/shiftzilla/version.rb
|
185
185
|
- shiftzilla.gemspec
|
186
186
|
- shiftzilla.sql.tmpl
|
187
|
-
- shiftzilla_cfg.
|
187
|
+
- shiftzilla_cfg.yaml.tmpl
|
188
188
|
- template.haml
|
189
189
|
- vendor/flot/jquery.flot.min.js
|
190
190
|
homepage: http://github.com/nhr/shiftzilla
|
@@ -206,7 +206,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
206
206
|
- !ruby/object:Gem::Version
|
207
207
|
version: '0'
|
208
208
|
requirements: []
|
209
|
-
|
209
|
+
rubyforge_project:
|
210
|
+
rubygems_version: 2.7.7
|
210
211
|
signing_key:
|
211
212
|
specification_version: 4
|
212
213
|
summary: Shiftzilla is a tool for providing historical reports based on Bugzilla data
|