changelogerator 0.0.3 → 0.0.4
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/changelogerator.rb +15 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 89077503cda4df3c6d813044075fa0591afa42168fd67d39f6f7eebd96517bd9
|
4
|
+
data.tar.gz: 4c30ade3d3add13f89d2e58caa0e969419dbbbd3e791474c3a0312c7187e2517
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d3abb976ce5d2535e124e21bf08c659cd1871b3abb2b07c7689a2a9be5caac12e1c5da8804dafc4bec39dc43a4cc500bb438cb053cd53771ddfac61c1df22a4
|
7
|
+
data.tar.gz: a98c41f206459175f095530fddff50ca9aaead1e4b627d56f670550ede19c62840ad263dbbd341e4951856e26f7e60e437253ba65906672e2d25ef2245222c8c
|
data/lib/changelogerator.rb
CHANGED
@@ -8,6 +8,7 @@
|
|
8
8
|
# Probably not tremendously useful to other projects.
|
9
9
|
class Changelog
|
10
10
|
require 'octokit'
|
11
|
+
require 'git_diff_parser'
|
11
12
|
|
12
13
|
attr_accessor :changes
|
13
14
|
attr_reader :priority
|
@@ -55,6 +56,15 @@ class Changelog
|
|
55
56
|
end
|
56
57
|
end
|
57
58
|
|
59
|
+
def self.changes_files_in_paths?(change, paths)
|
60
|
+
changed_files = GitDiffParser.parse(Octokit.get(change.diff_url)).files
|
61
|
+
paths = [paths] unless paths.is_a? Array
|
62
|
+
paths.each do |path|
|
63
|
+
return true if changed_files.find { |l| l.match path }
|
64
|
+
end
|
65
|
+
nil
|
66
|
+
end
|
67
|
+
|
58
68
|
## End of class methods
|
59
69
|
|
60
70
|
# github_repo: 'paritytech/polkadot'
|
@@ -79,6 +89,11 @@ class Changelog
|
|
79
89
|
self.class.changes_with_label(@changes, label)
|
80
90
|
end
|
81
91
|
|
92
|
+
def runtime_changes?
|
93
|
+
|
94
|
+
nil
|
95
|
+
end
|
96
|
+
|
82
97
|
private
|
83
98
|
|
84
99
|
def apply_priority_to_change(change)
|