gitlab-burndown 0.0.4 → 0.0.5
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/gitlab-burndown/csv_field/labels.rb +7 -0
- data/lib/gitlab-burndown/filter/closed_after_date.rb +8 -1
- data/lib/gitlab-burndown/filter/filter_list.rb +3 -2
- data/lib/gitlab-burndown/filter/no_include_labels.rb +8 -3
- data/lib/gitlab-burndown/generator/issue_csv_generator.rb +3 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 540d9d31e242b9d7005e16ef4e04727341804250b3ed39bcd53e3148deb629f4
|
4
|
+
data.tar.gz: c80a056ee923672aa1c6a2feb92cdce92786b6bbf1c6960806158e7424fe445c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2767b33f0a0d600542f1ae05cb3ba0dc4d652362bcceea604e4fa34af2d82a5924eca1590509dafde37cad9fb48617e0b58de78d4b1b70c51b8b704875031313
|
7
|
+
data.tar.gz: 8228561bea48c3fb4d1de45e71c31273b00bcd55ae9d13568572d929108513af91092723cbc261f7765fb7becaaaf080880a32b89b41d1a46e246356ee6f1818
|
@@ -7,10 +7,17 @@ class ClosedAfterDateFilter < Filter
|
|
7
7
|
@last_allowed_date = last_allowed_date
|
8
8
|
end
|
9
9
|
|
10
|
-
def
|
10
|
+
def include?(target)
|
11
11
|
return true if @last_allowed_date.nil?
|
12
12
|
return true if target['closed_at'].nil?
|
13
13
|
|
14
14
|
Date.iso8601(target['closed_at']) > @last_allowed_date
|
15
15
|
end
|
16
|
+
|
17
|
+
def apply(target)
|
18
|
+
return true if include? target
|
19
|
+
|
20
|
+
warn "Excluding '#{target['title']}' due to closed after date filter (#{target['web_url']})"
|
21
|
+
false
|
22
|
+
end
|
16
23
|
end
|
@@ -6,9 +6,14 @@ class NoIncludeLabelsFilter < Filter
|
|
6
6
|
@labels = labels
|
7
7
|
end
|
8
8
|
|
9
|
+
def include?(target)
|
10
|
+
target['labels'].intersection(@labels).empty?
|
11
|
+
end
|
12
|
+
|
9
13
|
def apply(target)
|
10
|
-
|
11
|
-
|
12
|
-
|
14
|
+
return true if include? target
|
15
|
+
|
16
|
+
warn "Excluding '#{target['title']}' due to label filter (#{target['web_url']})"
|
17
|
+
false
|
13
18
|
end
|
14
19
|
end
|
@@ -6,13 +6,14 @@ require 'gitlab-burndown/csv_field/fields'
|
|
6
6
|
require 'gitlab-burndown/csv_field/hour_estimate'
|
7
7
|
require 'gitlab-burndown/csv_field/iid'
|
8
8
|
require 'gitlab-burndown/csv_field/in_sprint'
|
9
|
+
require 'gitlab-burndown/csv_field/labels'
|
9
10
|
require 'gitlab-burndown/csv_field/milestone'
|
10
11
|
require 'gitlab-burndown/csv_field/title'
|
11
12
|
require 'gitlab-burndown/csv_field/web_url'
|
12
13
|
|
13
14
|
class IssueCSVGenerator < CSVGenerator
|
14
15
|
def initialize(issues)
|
15
|
-
super('IID;Title;Category;Milestone;Estimated hours;In current sprint;Is completed;Completed date;URL')
|
16
|
+
super('IID;Title;Category;Milestone;Estimated hours;In current sprint;Is completed;Completed date;Labels;URL')
|
16
17
|
@issues = issues
|
17
18
|
end
|
18
19
|
|
@@ -34,6 +35,7 @@ class IssueCSVGenerator < CSVGenerator
|
|
34
35
|
IssueInSprintCSVField,
|
35
36
|
IssueClosedStateCSVField,
|
36
37
|
IssueClosedAtCSVField,
|
38
|
+
IssueLabelsCSVField,
|
37
39
|
IssueWebURLCSVField
|
38
40
|
)
|
39
41
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitlab-burndown
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andreas Kruhlmann
|
@@ -28,6 +28,7 @@ files:
|
|
28
28
|
- lib/gitlab-burndown/csv_field/hour_estimate.rb
|
29
29
|
- lib/gitlab-burndown/csv_field/iid.rb
|
30
30
|
- lib/gitlab-burndown/csv_field/in_sprint.rb
|
31
|
+
- lib/gitlab-burndown/csv_field/labels.rb
|
31
32
|
- lib/gitlab-burndown/csv_field/milestone.rb
|
32
33
|
- lib/gitlab-burndown/csv_field/title.rb
|
33
34
|
- lib/gitlab-burndown/csv_field/web_url.rb
|