danger 6.0.0 → 6.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/danger/request_sources/gitlab.rb +29 -22
- data/lib/danger/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: df3df4ffaefafa6d1345b6dcd7b02ffad8001548e74a70eaa1226dae5efd173d
|
|
4
|
+
data.tar.gz: 6d739d7c9f007eaee64f019b83026596aa64204c7df94cd005fdf4aa52ffc013
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 62305cb2f4c3a49a8e9e46a769c89229b124dde8d14946ec5b32899553acc154f9ac7112d26cefd5f9ae82b2bffc90ef61dd70ad88752721e1bb95e84a76ce06
|
|
7
|
+
data.tar.gz: 45b7199bb54b2fa90622539f79206b186d8aabf1e55821ad56a9dbb746b3891f894b4bbdf5ea75911d983bb81211a32b6032cc5123757c85774429d106b90a80
|
|
@@ -399,33 +399,40 @@ module Danger
|
|
|
399
399
|
end
|
|
400
400
|
end
|
|
401
401
|
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
head_sha: self.mr_json.diff_refs.head_sha
|
|
413
|
-
}
|
|
402
|
+
if matching_comments.empty?
|
|
403
|
+
params = {
|
|
404
|
+
body: body,
|
|
405
|
+
position: {
|
|
406
|
+
position_type: 'text',
|
|
407
|
+
new_path: m.file,
|
|
408
|
+
new_line: m.line,
|
|
409
|
+
base_sha: self.mr_json.diff_refs.base_sha,
|
|
410
|
+
start_sha: self.mr_json.diff_refs.start_sha,
|
|
411
|
+
head_sha: self.mr_json.diff_refs.head_sha
|
|
414
412
|
}
|
|
413
|
+
}
|
|
414
|
+
begin
|
|
415
415
|
client.create_merge_request_discussion(ci_source.repo_slug, ci_source.pull_request_id, params)
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
416
|
+
rescue Gitlab::Error::Error => e
|
|
417
|
+
message = [e, "body: #{body}", "position: #{params[:position].inspect}"].join("\n")
|
|
418
|
+
puts message
|
|
419
419
|
|
|
420
|
-
|
|
421
|
-
comment = matching_comments.first
|
|
422
|
-
client.update_merge_request_discussion_note(ci_source.repo_slug, ci_source.pull_request_id, comment["discussion_id"], comment["id"], body)
|
|
420
|
+
next false
|
|
423
421
|
end
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
422
|
+
else
|
|
423
|
+
# Remove the surviving comment so we don't strike it out
|
|
424
|
+
danger_comments.reject! { |c| matching_comments.include? c }
|
|
427
425
|
|
|
428
|
-
|
|
426
|
+
# Update the comment to remove the strikethrough if present
|
|
427
|
+
comment = matching_comments.first
|
|
428
|
+
begin
|
|
429
|
+
client.update_merge_request_discussion_note(ci_source.repo_slug, ci_source.pull_request_id, comment["discussion_id"], comment["id"], body)
|
|
430
|
+
rescue Gitlab::Error::Error => e
|
|
431
|
+
message = [e, "body: #{body}"].join("\n")
|
|
432
|
+
puts message
|
|
433
|
+
|
|
434
|
+
next false
|
|
435
|
+
end
|
|
429
436
|
end
|
|
430
437
|
|
|
431
438
|
# Remove this element from the array
|
data/lib/danger/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: danger
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 6.0.
|
|
4
|
+
version: 6.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Orta Therox
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2019-03-
|
|
12
|
+
date: 2019-03-14 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: claide
|