danger 5.14.0 → 5.15.0

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
- SHA1:
3
- metadata.gz: 3ad7a6d0ad0c2cac62253cf27996a549026159df
4
- data.tar.gz: 247abc76bb8cd25047c242835330e09413268d40
2
+ SHA256:
3
+ metadata.gz: a476be73dbdfc6a2c7706712403d7209cdc47a1a486ddccb9be0ff403ab4aacf
4
+ data.tar.gz: 3db92f40356945dc85d35e88afdf04d6271afff0296088fedeeebde6607b1447
5
5
  SHA512:
6
- metadata.gz: fc508c5fea76dab88a9fdbc0574e8d8d8674e8a21a7f53bc4d39c94bc9ba413ca4dae3a87d2f7081c1e180234ee2c659b7922897eba840e156cb30c4636d2ac2
7
- data.tar.gz: 3863dd8cf1b5470bda0af673ea8bf3a6b22709959335b6fc7f29394523bb96a325aed0e499bb8b844c2bc6239b5a446415acdd434dae334d9696c3718a145dc1
6
+ metadata.gz: da6442b3c91745b44e6e6a0f046faf902d3fdbd6a44ba10fa4168196ce0b52297c8a18fffddeadfe34d805a3df310bb9dfa55d279511e9248c1949fdf210058a
7
+ data.tar.gz: '08d9329626584fdb92d846494acd5d7ffaa5b154b0f63bcd57774a98bf8a2162e0e694e721c5bd0e918c256cb78f4f2f88c5fdb881242c7b57eb51ef1cfb3375'
@@ -1,8 +1,7 @@
1
1
  # coding: utf-8
2
-
2
+ require "uri"
3
3
  require "danger/helpers/comments_helper"
4
4
  require "danger/helpers/comment"
5
-
6
5
  require "danger/request_sources/support/get_ignored_violation"
7
6
 
8
7
  module Danger
@@ -56,12 +55,11 @@ module Danger
56
55
  end
57
56
 
58
57
  def endpoint
59
- @endpoint ||= @environment["DANGER_GITLAB_API_BASE_URL"] ||
60
- "https://gitlab.com/api/v4"
58
+ @endpoint ||= @environment["DANGER_GITLAB_API_BASE_URL"] || @environment["CI_API_V4_URL"] || "https://gitlab.com/api/v4"
61
59
  end
62
60
 
63
61
  def host
64
- @host ||= @environment["DANGER_GITLAB_HOST"] || "gitlab.com"
62
+ @host ||= @environment["DANGER_GITLAB_HOST"] || URI.parse(endpoint).host || "gitlab.com"
65
63
  end
66
64
 
67
65
  def base_commit
@@ -133,7 +131,7 @@ module Danger
133
131
  danger_id: danger_id,
134
132
  template: "gitlab")
135
133
 
136
- if editable_comments.empty?
134
+ if editable_comments.empty? or should_create_new_comment
137
135
  client.create_merge_request_comment(
138
136
  ci_source.repo_slug, ci_source.pull_request_id, body
139
137
  )
@@ -1,4 +1,4 @@
1
1
  module Danger
2
- VERSION = "5.14.0".freeze
2
+ VERSION = "5.15.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.14.0
4
+ version: 5.15.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-11 00:00:00.000000000 Z
12
+ date: 2019-02-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: claide
@@ -300,7 +300,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
300
300
  version: '0'
301
301
  requirements: []
302
302
  rubyforge_project:
303
- rubygems_version: 2.5.2.3
303
+ rubygems_version: 2.7.6
304
304
  signing_key:
305
305
  specification_version: 4
306
306
  summary: Like Unit Tests, but for your Team Culture.