changelogerator 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/changelogerator.rb +15 -0
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b916cdb658f760af9794c4f947c54839f8b19b596b3a0fe9e20f674c8898f31d
4
- data.tar.gz: efa45a9492704d76197ccb4b3d15d227a6c4a01d35bfe8fe6ff81b7b84049532
3
+ metadata.gz: 89077503cda4df3c6d813044075fa0591afa42168fd67d39f6f7eebd96517bd9
4
+ data.tar.gz: 4c30ade3d3add13f89d2e58caa0e969419dbbbd3e791474c3a0312c7187e2517
5
5
  SHA512:
6
- metadata.gz: 298138ad4d9d52615de65931e3a96d7b5aee928bc71732a7142dfe2b8d97008d0dc090c2ef9ce81060b375288e3c5d9a4a3a375dafbca0b056d4b0b525ddcdc7
7
- data.tar.gz: 70897f7bf61f7721a9d7097479e7c39c4be18c1781d970908b0620aadb2bf106d31ba81d0bc8e0e0eed988e38e0fda49a7f6549c38d511d0f8dd5e48db2fc93f
6
+ metadata.gz: 2d3abb976ce5d2535e124e21bf08c659cd1871b3abb2b07c7689a2a9be5caac12e1c5da8804dafc4bec39dc43a4cc500bb438cb053cd53771ddfac61c1df22a4
7
+ data.tar.gz: a98c41f206459175f095530fddff50ca9aaead1e4b627d56f670550ede19c62840ad263dbbd341e4951856e26f7e60e437253ba65906672e2d25ef2245222c8c
@@ -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)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: changelogerator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Pugh