danger 5.16.1 → 6.0.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 133d839f0f6c3eedc50601b624f25f793f9fa29e
4
- data.tar.gz: d946b6c8c735b6953da0aa10c25f1d79e973a37c
2
+ SHA256:
3
+ metadata.gz: 4d07daba46ea8c061e649a70aea12ae0861e959401e6231f4fa234bb90f6ca41
4
+ data.tar.gz: d61955050a1978795d286e1fd871ba7a00171ba219be928d14a5eb78c3dea86d
5
5
  SHA512:
6
- metadata.gz: 87d8c1b18b032a8cbba94c2ab7286014c2a302d3ea23f7fc54cb6e7d731c8908c9a4851703a8b574609b5f12e151cbce27d84c208929afdd0ca7c5203a9a12a7
7
- data.tar.gz: 4be777c012951b447e52f431c6ec9537159011c584a2f52928ec6543ca747a8a7f583bcde36941838380b5e4efc34fb9b152c9c3ab339f602008ceeeddf3632f
6
+ metadata.gz: 58c8913b443458cfebfd6d7cb257fc5bbebe7c1d024f37aeec9d9b9a11c7c629bf31e610e1a965c3a574270aa86f7268f5ecb6d47e57539e02a4c421b6e51555
7
+ data.tar.gz: 8b497b276d5c04fda4704c1c018d088dbd9b729b6a91750b988e7e1aac6d9cd8ab24975fac75b1f3371638278e13fe62bcf888b0606f775557dba7bd8f25e72a
data/README.md CHANGED
@@ -91,4 +91,4 @@ We try to keep as much discussion as possible in GitHub issues, but also have a
91
91
 
92
92
  > This project subscribes to the [Moya Contributors Guidelines](https://github.com/Moya/contributors) which TLDR: means we give out push access easily and often.
93
93
 
94
- > Contributors subscribe to the [Contributor Code of Conduct](http://contributor-covenant.org/version/1/3/0/) based on the [Contributor Covenant](http://contributor-covenant.org) version 1.3.0.
94
+ > Contributors subscribe to the [Contributor Code of Conduct](https://contributor-covenant.org/version/1/3/0/) based on the [Contributor Covenant](https://contributor-covenant.org) version 1.3.0.
@@ -375,6 +375,12 @@ module Danger
375
375
  pattern = "+++ b/" + message.file + "\n"
376
376
  file_start = diff_lines.index(pattern)
377
377
 
378
+ # Files containing spaces sometimes have a trailing tab
379
+ if file_start.nil?
380
+ pattern = "+++ b/" + message.file + "\t\n"
381
+ file_start = diff_lines.index(pattern)
382
+ end
383
+
378
384
  return nil if file_start.nil?
379
385
 
380
386
  position = -1
@@ -399,26 +399,33 @@ module Danger
399
399
  end
400
400
  end
401
401
 
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
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
+ }
412
414
  }
413
- }
414
- client.create_merge_request_discussion(ci_source.repo_slug, ci_source.pull_request_id, params)
415
- else
416
- # Remove the surviving comment so we don't strike it out
417
- danger_comments.reject! { |c| matching_comments.include? c }
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 }
418
419
 
419
- # Update the comment to remove the strikethrough if present
420
- comment = matching_comments.first
421
- client.update_merge_request_discussion_note(ci_source.repo_slug, ci_source.pull_request_id, comment["discussion_id"], comment["id"], body)
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)
423
+ end
424
+ rescue Gitlab::Error::Error => e
425
+ message = [e, "body: #{body}", "position: #{params[:position].inspect}"].join("\n")
426
+ puts message
427
+
428
+ next false
422
429
  end
423
430
 
424
431
  # Remove this element from the array
@@ -1,4 +1,4 @@
1
1
  module Danger
2
- VERSION = "5.16.1".freeze
2
+ VERSION = "6.0.0".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: 5.16.1
4
+ version: 6.0.0
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-02-28 00:00:00.000000000 Z
12
+ date: 2019-03-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: claide
@@ -96,33 +96,47 @@ dependencies:
96
96
  - !ruby/object:Gem::Version
97
97
  version: '1.0'
98
98
  - !ruby/object:Gem::Dependency
99
- name: octokit
99
+ name: kramdown
100
100
  requirement: !ruby/object:Gem::Requirement
101
101
  requirements:
102
102
  - - "~>"
103
103
  - !ruby/object:Gem::Version
104
- version: '4.7'
104
+ version: '2.0'
105
105
  type: :runtime
106
106
  prerelease: false
107
107
  version_requirements: !ruby/object:Gem::Requirement
108
108
  requirements:
109
109
  - - "~>"
110
110
  - !ruby/object:Gem::Version
111
- version: '4.7'
111
+ version: '2.0'
112
112
  - !ruby/object:Gem::Dependency
113
- name: kramdown
113
+ name: kramdown-parser-gfm
114
114
  requirement: !ruby/object:Gem::Requirement
115
115
  requirements:
116
116
  - - "~>"
117
117
  - !ruby/object:Gem::Version
118
- version: '1.5'
118
+ version: '1.0'
119
119
  type: :runtime
120
120
  prerelease: false
121
121
  version_requirements: !ruby/object:Gem::Requirement
122
122
  requirements:
123
123
  - - "~>"
124
124
  - !ruby/object:Gem::Version
125
- version: '1.5'
125
+ version: '1.0'
126
+ - !ruby/object:Gem::Dependency
127
+ name: octokit
128
+ requirement: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - "~>"
131
+ - !ruby/object:Gem::Version
132
+ version: '4.7'
133
+ type: :runtime
134
+ prerelease: false
135
+ version_requirements: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - "~>"
138
+ - !ruby/object:Gem::Version
139
+ version: '4.7'
126
140
  - !ruby/object:Gem::Dependency
127
141
  name: terminal-table
128
142
  requirement: !ruby/object:Gem::Requirement
@@ -294,7 +308,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
294
308
  requirements:
295
309
  - - ">="
296
310
  - !ruby/object:Gem::Version
297
- version: 2.0.0
311
+ version: 2.3.0
298
312
  required_rubygems_version: !ruby/object:Gem::Requirement
299
313
  requirements:
300
314
  - - ">="
@@ -302,7 +316,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
302
316
  version: '0'
303
317
  requirements: []
304
318
  rubyforge_project:
305
- rubygems_version: 2.5.2.3
319
+ rubygems_version: 2.7.6
306
320
  signing_key:
307
321
  specification_version: 4
308
322
  summary: Like Unit Tests, but for your Team Culture.