lib/danger/request_sources/github/github.rb in danger-5.3.0 vs lib/danger/request_sources/github/github.rb in danger-5.3.1

- old
+ new

@@ -1,7 +1,9 @@ # coding: utf-8 +# rubocop:disable Metrics/ClassLength + require "octokit" require "danger/helpers/comments_helper" require "danger/helpers/comment" require "danger/request_sources/github/github_review" require "danger/request_sources/github/github_review_unsupported" @@ -310,16 +312,17 @@ # We remove from the array since it won't have a place in the table anymore previous_violations.reject! { |v| messages_are_equivalent(v, m) } end matching_comments = danger_comments.select do |comment_data| - if comment_data["path"] == m.file && comment_data["commit_id"] == head_ref && comment_data["position"] == position + if comment_data["path"] == m.file && comment_data["position"] == position # Parse it to avoid problems with strikethrough violation = violations_from_table(comment_data["body"]).first if violation messages_are_equivalent(violation, m) else - comment_data["body"] == body + blob_regexp = %r{blob/[0-9a-z]+/} + comment_data["body"].sub(blob_regexp, "") == body.sub(blob_regexp, "") end else false end end