pronto-github_resolver 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/pronto/github_resolver/version.rb +1 -1
- data/lib/pronto/github_resolver.rb +1 -15
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23f7bc5d4cc79dd38274876a42bde7415e46d74709de16d0679b4e1c6075db55
|
4
|
+
data.tar.gz: 78bf5cb42c9ea45a020ec6a853959e0445058c0e587fad684a2d3e9790841258
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c1ed837a3fb1a1e8cf16d613d68be09df09fa6cbd87d82d634ccff9ac20635296c5e14326169394fcbe8eee621ab6302b3b51bf25e099abe46a42b1911fa927e
|
7
|
+
data.tar.gz: 95bc80951dca62a513ac75728f7bdfc75cdad52e40f8836175eeff7d217b4282aaba51927c6409d31b8e1138967aff59d5efa1bc328ad2a44402b5bc7f3d9c6f
|
data/Gemfile.lock
CHANGED
@@ -6,20 +6,6 @@ require 'pronto'
|
|
6
6
|
module Pronto
|
7
7
|
|
8
8
|
class Github < Client
|
9
|
-
# pronto messes up relative paths and does not have tests for this, patch to add repo.path.join
|
10
|
-
def pull_comments(sha)
|
11
|
-
@comment_cache["#{pull_id}/#{sha}"] ||= begin
|
12
|
-
client.pull_comments(slug, pull_id).map do |comment|
|
13
|
-
Comment.new(sha, comment.body, @repo.path.join(comment.path),
|
14
|
-
comment.position || comment.original_position)
|
15
|
-
end
|
16
|
-
end
|
17
|
-
rescue Octokit::NotFound => e
|
18
|
-
@config.logger.log("Error raised and rescued: #{e}")
|
19
|
-
msg = "Pull request for sha #{sha} with id #{pull_id} was not found."
|
20
|
-
raise Pronto::Error, msg
|
21
|
-
end
|
22
|
-
|
23
9
|
def publish_pull_request_comments(comments, event: nil)
|
24
10
|
comments_left = comments.clone
|
25
11
|
while comments_left.any?
|
@@ -166,7 +152,7 @@ module Pronto
|
|
166
152
|
client.get_review_threads.each_pair do |thread_id, thread_comments|
|
167
153
|
next unless thread_comments.all? do |comment|
|
168
154
|
comment[:authored] &&
|
169
|
-
(actual_comments[[
|
155
|
+
(actual_comments[[comment[:path], comment[:position]]] || []).none? { |actual_comment|
|
170
156
|
comment[:body].include?(actual_comment.body)
|
171
157
|
}
|
172
158
|
end
|