danger 5.5.1 → 5.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/danger/ci_source/gitlab_ci.rb +2 -2
- data/lib/danger/request_sources/gitlab.rb +7 -2
- data/lib/danger/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 336ff138e13d844d9c929f28ddea10a1a5a580a4
|
4
|
+
data.tar.gz: 359ee0f4fd27a7e7bf76ae43f20ee0433b8d6056
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 512935e983933356dfc82a642a878a665c7163c1461c95108444a59b5cdefc38b3a0bc6f089df4465d357c66536e7020de960a2d7390faf5f46957f66efd17ff
|
7
|
+
data.tar.gz: '0682177cce8bce5ce8109fd686f9329196758e98c674e79506b78eab71cc26a8ee7df03f479b310f7b65e93e996145cd6fab4643d1927c61cd23028246f1e1cc'
|
@@ -38,8 +38,8 @@ module Danger
|
|
38
38
|
client = RequestSources::GitLab.new(nil, env).client
|
39
39
|
|
40
40
|
merge_requests = client.merge_requests(project_id, state: :opened)
|
41
|
-
merge_request = merge_requests.auto_paginate.
|
42
|
-
mr.sha
|
41
|
+
merge_request = merge_requests.auto_paginate.find do |mr|
|
42
|
+
mr.sha == base_commit
|
43
43
|
end
|
44
44
|
|
45
45
|
merge_request.nil? ? 0 : merge_request.iid
|
@@ -58,8 +58,12 @@ module Danger
|
|
58
58
|
end
|
59
59
|
|
60
60
|
def base_commit
|
61
|
-
|
62
|
-
|
61
|
+
if self.commits_json.last
|
62
|
+
first_commit_in_branch = self.commits_json.last.id
|
63
|
+
@base_commit ||= self.scm.exec "rev-parse #{first_commit_in_branch}^1"
|
64
|
+
else
|
65
|
+
@base_commit = ""
|
66
|
+
end
|
63
67
|
end
|
64
68
|
|
65
69
|
def mr_comments
|
@@ -78,6 +82,7 @@ module Danger
|
|
78
82
|
end
|
79
83
|
|
80
84
|
def setup_danger_branches
|
85
|
+
raise "Are you running `danger local/pr` against the correct repository? Also this can happen if you run danger on MR without changes" if base_commit.empty?
|
81
86
|
base_branch = self.mr_json.source_branch
|
82
87
|
head_branch = self.mr_json.target_branch
|
83
88
|
head_commit = self.scm.head_commit
|
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: 5.5.
|
4
|
+
version: 5.5.2
|
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: 2017-
|
12
|
+
date: 2017-10-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: claide
|
@@ -487,7 +487,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
487
487
|
version: '0'
|
488
488
|
requirements: []
|
489
489
|
rubyforge_project:
|
490
|
-
rubygems_version: 2.
|
490
|
+
rubygems_version: 2.6.8
|
491
491
|
signing_key:
|
492
492
|
specification_version: 4
|
493
493
|
summary: Like Unit Tests, but for your Team Culture.
|