danger 3.0.2 → 3.0.3
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1bdf784866d4e556b6e665ae22edc46048983f26
|
4
|
+
data.tar.gz: d4e01b88a5b73d250a194cb98ada8f361c4b20ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 463ee74a57de4fdf20387f988da779668a6adced5c8785ec2723e83cf3cbc88f990e4dea7767f8c4559286be4253718a1bab0fdb61003be0229b64b005e764f0
|
7
|
+
data.tar.gz: 6c73599cbc71be47bd903336cb5a106b5d8932544188ef30b6d93853ddf0ec515f08fc867c4efeda734acad5b0dd363e0fd4e6fd92ef0dabebc14e1cf72972a4
|
@@ -109,6 +109,15 @@ module Danger
|
|
109
109
|
@gitlab.mr_json.labels
|
110
110
|
end
|
111
111
|
|
112
|
+
# @!group MR Content
|
113
|
+
# The unified diff produced by GitLab for this PR
|
114
|
+
# see [Unified diff](https://en.wikipedia.org/wiki/Diff_utility#Unified_format)
|
115
|
+
# @return [String]
|
116
|
+
#
|
117
|
+
def mr_diff
|
118
|
+
@gitlab.mr_diff
|
119
|
+
end
|
120
|
+
|
112
121
|
# @!group MR Commit Metadata
|
113
122
|
# The branch to which the MR is going to be merged into
|
114
123
|
# @return [String]
|
@@ -177,7 +186,7 @@ module Danger
|
|
177
186
|
paths.first(paths.count - 1).join(", ") + " & " + paths.last
|
178
187
|
end
|
179
188
|
|
180
|
-
[:title, :body, :author, :labels, :json].each do |suffix|
|
189
|
+
[:title, :body, :author, :labels, :json, :diff].each do |suffix|
|
181
190
|
alias_method "pr_#{suffix}".to_sym, "mr_#{suffix}".to_sym
|
182
191
|
end
|
183
192
|
|
@@ -50,6 +50,11 @@ module Danger
|
|
50
50
|
.map { |comment| Comment.from_gitlab(comment) }
|
51
51
|
end
|
52
52
|
|
53
|
+
def mr_diff
|
54
|
+
@mr_diff ||= client.merge_request_changes(escaped_ci_slug, ci_source.pull_request_id)
|
55
|
+
.changes.map { |change| change["diff"] }.join("\n")
|
56
|
+
end
|
57
|
+
|
53
58
|
def escaped_ci_slug
|
54
59
|
@escaped_ci_slug ||= CGI.escape(ci_source.repo_slug)
|
55
60
|
end
|
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: 3.0.
|
4
|
+
version: 3.0.3
|
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: 2016-08-
|
12
|
+
date: 2016-08-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: claide
|