Skip to content

Commit

Permalink
Merge pull request fastlane-community#29 from crekby/bug/file-filtration
Browse files Browse the repository at this point in the history
fixed file filtration
  • Loading branch information
Josh Holtz authored Apr 26, 2020
2 parents c44d49e + 6d7f7dc commit af07f13
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/danger_plugin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ def xcov_available?

# Filters the files that haven't been modified in the current PR
def process_report(report)
file_names = @dangerfile.git.modified_files.map { |file| File.basename(file) }
file_names += @dangerfile.git.added_files.map { |file| File.basename(file) }
file_names = @dangerfile.git.modified_files.map { |file| File.expand_path(file) }
file_names += @dangerfile.git.added_files.map { |file| File.expand_path(file) }
report.targets.each do |target|
target.files = target.files.select { |file| file_names.include?(file.name) }
target.files = target.files.select { |file| file_names.include?(file.location) }
end

report
Expand Down

0 comments on commit af07f13

Please sign in to comment.