lib/danger/request_sources/github/github.rb in danger-5.9.0 vs lib/danger/request_sources/github/github.rb in danger-5.9.1
- old
+ new
@@ -379,9 +379,14 @@
position = -1
file_line = nil
diff_lines.drop(file_start).each do |line|
+ # If the line has `No newline` annotation, position need increment
+ if line.eql?("\ No newline at end of file\n")
+ position += 1
+ next
+ end
# If we found the start of another file diff, we went too far
break if line.match file_header_regexp
match = line.match range_header_regexp