danger 8.0.4 → 8.0.5
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 +4 -4
- data/lib/danger/ci_source/bitrise.rb +19 -6
- data/lib/danger/request_sources/gitlab.rb +2 -2
- data/lib/danger/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f6ea9c4a38578c0c9cd6e762b689010bce9de3bc6479134cce2f6c45afdce925
|
4
|
+
data.tar.gz: 4f131339c436c4ee163660341e0471c0c456b0251da17c6a5f5511f2fc3ac708
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 93226e7a7fe9b4300efb93ac07e59932eda1b25cae739f1f48d132f0d77f9d5f6a861d226785981f6580587cfd11380db5ec4e0935adea7c3707f35a5dc2af3d
|
7
|
+
data.tar.gz: 7cca48807d7cb110180f88b62d1af13591ba83791f0f1528384dcd2c4c3247394fec2abfb9c1bc592e496659d3d14f6f46e1813af125570c967713b9d602251c
|
@@ -50,16 +50,29 @@ module Danger
|
|
50
50
|
self.repo_url = env["GIT_REPOSITORY_URL"]
|
51
51
|
|
52
52
|
matcher_url = self.repo_url
|
53
|
+
self.repo_slug = repo_slug_from(self.repo_url)
|
54
|
+
end
|
53
55
|
|
54
|
-
|
55
|
-
if
|
56
|
-
|
56
|
+
def repo_slug_from(url)
|
57
|
+
if url =~ URI::regexp
|
58
|
+
# Try to parse the URL as a valid URI. This should cover the cases of http/https/ssh URLs.
|
59
|
+
begin
|
60
|
+
uri = URI.parse(url)
|
61
|
+
return uri.path.sub(/^(\/)/,'').sub(/(.git)$/,'')
|
62
|
+
rescue URI::InvalidURIError
|
63
|
+
# In case URL could not be parsed fallback to git URL parsing.
|
64
|
+
repo_slug_asgiturl(url)
|
65
|
+
end
|
66
|
+
else
|
67
|
+
# In case URL could not be parsed fallback to git URL parsing. git@github.com:organization/repo.git
|
68
|
+
repo_slug_asgiturl(url)
|
57
69
|
end
|
70
|
+
end
|
58
71
|
|
72
|
+
def repo_slug_asgiturl(url)
|
73
|
+
matcher_url = url
|
59
74
|
repo_matches = matcher_url.match(%r{([\/:])(([^\/]+\/)+[^\/]+?)(\.git$|$)})[2]
|
60
|
-
|
61
|
-
self.repo_slug = repo_matches unless repo_matches.nil?
|
62
|
-
|
75
|
+
return repo_matches unless repo_matches.nil?
|
63
76
|
end
|
64
77
|
end
|
65
78
|
end
|
@@ -208,7 +208,7 @@ module Danger
|
|
208
208
|
rest_inline_violations = submit_inline_comments!({
|
209
209
|
danger_id: danger_id,
|
210
210
|
previous_violations: previous_violations
|
211
|
-
}.merge(inline_violations))
|
211
|
+
}.merge(**inline_violations))
|
212
212
|
|
213
213
|
main_violations = merge_violations(
|
214
214
|
regular_violations, rest_inline_violations
|
@@ -227,7 +227,7 @@ module Danger
|
|
227
227
|
template: "gitlab",
|
228
228
|
danger_id: danger_id,
|
229
229
|
previous_violations: previous_violations
|
230
|
-
}.merge(main_violations))
|
230
|
+
}.merge(**main_violations))
|
231
231
|
|
232
232
|
comment_result =
|
233
233
|
if should_create_new_comment
|
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: 8.0.
|
4
|
+
version: 8.0.5
|
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: 2020-
|
12
|
+
date: 2020-08-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: claide
|
@@ -107,14 +107,14 @@ dependencies:
|
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '2.
|
110
|
+
version: '2.3'
|
111
111
|
type: :runtime
|
112
112
|
prerelease: false
|
113
113
|
version_requirements: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: '2.
|
117
|
+
version: '2.3'
|
118
118
|
- !ruby/object:Gem::Dependency
|
119
119
|
name: kramdown-parser-gfm
|
120
120
|
requirement: !ruby/object:Gem::Requirement
|