danger 5.3.0 → 5.3.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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0305fd8d9f84814f1c701d8368e9d64a8f044ed
|
4
|
+
data.tar.gz: 95d17dcbd3290b7cc01a51e13f12790f504a7a07
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af01026b1e5fef49454ee50c2e63eaefa33fc665b0d3cb5d83862028faa1affdd88741062be71eef74270539e9f380bf32046b1c5f1cc26117e68196ffd255f9
|
7
|
+
data.tar.gz: 677908dda67a4ed33ca7a18b3466bdefc805568b756fb7d95f23ed9c82d0a762c23a4cff5ffbc1d5ef596ca4dd6d33ab40f976fd8623a4a9e45d6d353553210e
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
|
3
|
+
# rubocop:disable Metrics/ClassLength
|
4
|
+
|
3
5
|
require "octokit"
|
4
6
|
require "danger/helpers/comments_helper"
|
5
7
|
require "danger/helpers/comment"
|
@@ -312,13 +314,14 @@ module Danger
|
|
312
314
|
end
|
313
315
|
|
314
316
|
matching_comments = danger_comments.select do |comment_data|
|
315
|
-
if comment_data["path"] == m.file && comment_data["
|
317
|
+
if comment_data["path"] == m.file && comment_data["position"] == position
|
316
318
|
# Parse it to avoid problems with strikethrough
|
317
319
|
violation = violations_from_table(comment_data["body"]).first
|
318
320
|
if violation
|
319
321
|
messages_are_equivalent(violation, m)
|
320
322
|
else
|
321
|
-
|
323
|
+
blob_regexp = %r{blob/[0-9a-z]+/}
|
324
|
+
comment_data["body"].sub(blob_regexp, "") == body.sub(blob_regexp, "")
|
322
325
|
end
|
323
326
|
else
|
324
327
|
false
|
@@ -14,9 +14,10 @@ module Danger
|
|
14
14
|
ensure_commitish_exists!(to)
|
15
15
|
|
16
16
|
merge_base = find_merge_base(repo, from, to)
|
17
|
+
commits_in_branch_count = commits_in_branch_count(from, to)
|
17
18
|
|
18
19
|
self.diff = repo.diff(merge_base, to)
|
19
|
-
self.log = repo.log.between(from, to)
|
20
|
+
self.log = repo.log(commits_in_branch_count).between(from, to)
|
20
21
|
end
|
21
22
|
|
22
23
|
def renamed_files
|
@@ -108,6 +109,10 @@ module Danger
|
|
108
109
|
def possible_merge_base(repo, from, to)
|
109
110
|
[repo.merge_base(from, to)].find { |base| commit_exists?(base) }
|
110
111
|
end
|
112
|
+
|
113
|
+
def commits_in_branch_count(from, to)
|
114
|
+
exec("rev-list #{from}..#{to} --count").to_i
|
115
|
+
end
|
111
116
|
end
|
112
117
|
end
|
113
118
|
|
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.3.
|
4
|
+
version: 5.3.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: 2017-06-
|
12
|
+
date: 2017-06-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: claide
|