Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

## master

* Use `in_reply_to_id` to lookup GitHub replies - [@kemchenj](https:/kemchenj.github.io/)

<!-- Your comment above here -->

## 9.1.0
Expand Down
6 changes: 1 addition & 5 deletions lib/danger/request_sources/github/github.rb
Original file line number Diff line number Diff line change
Expand Up @@ -275,12 +275,8 @@ def submit_inline_comments!(warnings: [], errors: [], messages: [], markdowns: [
client.update_pull_request_comment(ci_source.repo_slug, comment["id"], body)
else
# We remove non-sticky violations that have no replies
# Since there's no direct concept of a reply in GH, we simply consider
# the existence of non-danger comments in that line as replies
replies = non_danger_comments.select do |potential|
potential["path"] == comment["path"] &&
potential["position"] == comment["position"] &&
potential["commit_id"] == comment["commit_id"]
potential['in_reply_to_id'] == comment['id']
end

client.delete_pull_request_comment(ci_source.repo_slug, comment["id"]) if replies.empty?
Expand Down