danger-packwerk 0.3.0 → 0.4.0
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1a50f4eb29e8b1b964d365ccdc30749842efe091d659a5d62a7252d5af487fc2
|
|
4
|
+
data.tar.gz: ad82d90f8db9e0a416dff61ab76ab2a9084ccd39335e1a95e2b2c9c9b566cd18
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: db4b2cb2d0c4a3cb8e24667fc60e32f2172abb33f486c0613a4977a73412d15f10136a977724257a707af203314c5569375bb43447848fc27eb8e2b20ee721ef
|
|
7
|
+
data.tar.gz: ceb901dc21ad848fd0fabcbb8b299f2d7a3e101d3d295a5fbbbbdd49b086206f196b5996e4bf64ea40deadae893a3add09fc84df1890e80f5086ad44fa7e0dcf
|
|
@@ -45,7 +45,14 @@ module DangerPackwerk
|
|
|
45
45
|
|
|
46
46
|
current_comment_count = 0
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
# The format for git.renamed_files is a T::Array[{after: "some/path/new", before: "some/path/old"}]
|
|
49
|
+
renamed_files = git.renamed_files.map { |before_after_file| before_after_file[:after] }
|
|
50
|
+
|
|
51
|
+
violations_to_comment_on = violation_diff.added_violations.reject do |violation|
|
|
52
|
+
renamed_files.include?(violation.file)
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
violations_to_comment_on.group_by(&:class_name).each do |_class_name, violations|
|
|
49
56
|
break if current_comment_count >= max_comments
|
|
50
57
|
|
|
51
58
|
location = T.must(violations.first).file_location
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: danger-packwerk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Gusto Engineers
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-
|
|
11
|
+
date: 2022-09-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: danger-plugin-api
|