danger 6.0.0 → 6.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4d07daba46ea8c061e649a70aea12ae0861e959401e6231f4fa234bb90f6ca41
4
- data.tar.gz: d61955050a1978795d286e1fd871ba7a00171ba219be928d14a5eb78c3dea86d
3
+ metadata.gz: df3df4ffaefafa6d1345b6dcd7b02ffad8001548e74a70eaa1226dae5efd173d
4
+ data.tar.gz: 6d739d7c9f007eaee64f019b83026596aa64204c7df94cd005fdf4aa52ffc013
5
5
  SHA512:
6
- metadata.gz: 58c8913b443458cfebfd6d7cb257fc5bbebe7c1d024f37aeec9d9b9a11c7c629bf31e610e1a965c3a574270aa86f7268f5ecb6d47e57539e02a4c421b6e51555
7
- data.tar.gz: 8b497b276d5c04fda4704c1c018d088dbd9b729b6a91750b988e7e1aac6d9cd8ab24975fac75b1f3371638278e13fe62bcf888b0606f775557dba7bd8f25e72a
6
+ metadata.gz: 62305cb2f4c3a49a8e9e46a769c89229b124dde8d14946ec5b32899553acc154f9ac7112d26cefd5f9ae82b2bffc90ef61dd70ad88752721e1bb95e84a76ce06
7
+ data.tar.gz: 45b7199bb54b2fa90622539f79206b186d8aabf1e55821ad56a9dbb746b3891f894b4bbdf5ea75911d983bb81211a32b6032cc5123757c85774429d106b90a80
@@ -399,33 +399,40 @@ module Danger
399
399
  end
400
400
  end
401
401
 
402
- begin
403
- if matching_comments.empty?
404
- params = {
405
- body: body,
406
- position: {
407
- position_type: 'text',
408
- new_path: m.file,
409
- new_line: m.line,
410
- base_sha: self.mr_json.diff_refs.base_sha,
411
- start_sha: self.mr_json.diff_refs.start_sha,
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
- else
417
- # Remove the surviving comment so we don't strike it out
418
- danger_comments.reject! { |c| matching_comments.include? c }
416
+ rescue Gitlab::Error::Error => e
417
+ message = [e, "body: #{body}", "position: #{params[:position].inspect}"].join("\n")
418
+ puts message
419
419
 
420
- # Update the comment to remove the strikethrough if present
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
- rescue Gitlab::Error::Error => e
425
- message = [e, "body: #{body}", "position: #{params[:position].inspect}"].join("\n")
426
- puts message
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
- next false
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
@@ -1,4 +1,4 @@
1
1
  module Danger
2
- VERSION = "6.0.0".freeze
2
+ VERSION = "6.0.1".freeze
3
3
  DESCRIPTION = "Like Unit Tests, but for your Team Culture.".freeze
4
4
  end
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.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-11 00:00:00.000000000 Z
12
+ date: 2019-03-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: claide