gitlab-dangerfiles 4.14.1 → 4.15.0
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/Gemfile.lock +47 -32
- data/gitlab-dangerfiles.gemspec +1 -5
- data/lib/danger/plugins/changelog.rb +9 -1
- data/lib/danger/plugins/internal/helper.rb +30 -0
- data/lib/gitlab/dangerfiles/version.rb +1 -1
- metadata +4 -18
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 789f75e500d2b2210d7c34b50e48bbc3b35dd75e5437bbc88823724ea77b54b4
|
|
4
|
+
data.tar.gz: 26a5ce6a34a3442d899238876119b78f5e1df145cbdb831e6edd980e7a2cfa8b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 64dc5d098e8ab8d39815677d38a18f178b84b9c142794880a192be0ab254e7bc01ba47736218f2628cd6c79c262ff021a47ae61d3b0b50d250a2621decf58455
|
|
7
|
+
data.tar.gz: b7d0d669b8a89ebf7d09e206588cc849fabb06bd36befabfd78edbe65eaad8d2ce2d56dae6106d09b0cbb65de3c3bf3f3064daad83cf3a3f03e06b1c5a16c1b1
|
data/Gemfile.lock
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
gitlab-dangerfiles (4.
|
|
5
|
-
danger (>= 9.
|
|
4
|
+
gitlab-dangerfiles (4.15.0)
|
|
5
|
+
danger (>= 9.6.2)
|
|
6
6
|
danger-gitlab (>= 8.0.0)
|
|
7
|
-
git (< 6)
|
|
8
7
|
rake (~> 13.0)
|
|
9
8
|
|
|
10
9
|
GEM
|
|
@@ -18,6 +17,7 @@ GEM
|
|
|
18
17
|
addressable (2.8.1)
|
|
19
18
|
public_suffix (>= 2.0.2, < 6.0)
|
|
20
19
|
ast (2.4.2)
|
|
20
|
+
base64 (0.3.0)
|
|
21
21
|
binding_of_caller (1.0.0)
|
|
22
22
|
debug_inspector (>= 0.0.1)
|
|
23
23
|
claide (1.1.0)
|
|
@@ -33,36 +33,42 @@ GEM
|
|
|
33
33
|
colored2 (~> 3.1)
|
|
34
34
|
crack (0.4.5)
|
|
35
35
|
rexml
|
|
36
|
-
|
|
36
|
+
csv (3.3.7)
|
|
37
|
+
danger (9.6.2)
|
|
38
|
+
base64 (~> 0.2)
|
|
37
39
|
claide (~> 1.0)
|
|
38
40
|
claide-plugins (>= 0.9.2)
|
|
39
|
-
colored2 (
|
|
41
|
+
colored2 (>= 3.1, < 5)
|
|
40
42
|
cork (~> 0.1)
|
|
41
43
|
faraday (>= 0.9.0, < 3.0)
|
|
42
|
-
faraday-http-cache (
|
|
43
|
-
git (
|
|
44
|
-
kramdown (
|
|
44
|
+
faraday-http-cache (>= 2.0, < 4.0)
|
|
45
|
+
git (>= 1.13)
|
|
46
|
+
kramdown (>= 2.5.1, < 3.0)
|
|
45
47
|
kramdown-parser-gfm (~> 1.0)
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
terminal-table (>= 1, <
|
|
48
|
+
octokit (>= 4.0)
|
|
49
|
+
pstore (~> 0.1)
|
|
50
|
+
terminal-table (>= 1, < 5)
|
|
49
51
|
danger-gitlab (8.0.0)
|
|
50
52
|
danger
|
|
51
53
|
gitlab (~> 4.2, >= 4.2.0)
|
|
52
54
|
debug_inspector (1.1.0)
|
|
53
55
|
diff-lcs (1.5.0)
|
|
54
|
-
faraday (2.
|
|
55
|
-
faraday-net_http (>= 2.0, < 3.
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
faraday (2.15.1)
|
|
57
|
+
faraday-net_http (>= 2.0, < 3.6)
|
|
58
|
+
json
|
|
59
|
+
logger
|
|
60
|
+
faraday-http-cache (2.5.1)
|
|
58
61
|
faraday (>= 0.8)
|
|
59
|
-
faraday-net_http (3.0
|
|
62
|
+
faraday-net_http (3.5.0)
|
|
63
|
+
net-http (~> 0.5)
|
|
60
64
|
ffi (1.15.5)
|
|
61
65
|
formatador (1.1.0)
|
|
62
|
-
git (
|
|
66
|
+
git (2.3.3)
|
|
67
|
+
activesupport (>= 5.0)
|
|
63
68
|
addressable (~> 2.8)
|
|
69
|
+
process_executer (~> 1.1)
|
|
64
70
|
rchardet (~> 1.8)
|
|
65
|
-
gitlab (4.
|
|
71
|
+
gitlab (4.20.1)
|
|
66
72
|
httparty (~> 0.20)
|
|
67
73
|
terminal-table (>= 1.5.1)
|
|
68
74
|
gitlab-styles (10.0.0)
|
|
@@ -86,32 +92,38 @@ GEM
|
|
|
86
92
|
guard-compat (~> 1.1)
|
|
87
93
|
rspec (>= 2.99.0, < 4.0)
|
|
88
94
|
hashdiff (1.0.1)
|
|
89
|
-
httparty (0.
|
|
95
|
+
httparty (0.24.3)
|
|
96
|
+
csv
|
|
90
97
|
mini_mime (>= 1.0.0)
|
|
91
98
|
multi_xml (>= 0.5.2)
|
|
92
99
|
i18n (1.12.0)
|
|
93
100
|
concurrent-ruby (~> 1.0)
|
|
94
101
|
json (2.6.3)
|
|
95
|
-
kramdown (2.
|
|
96
|
-
rexml
|
|
102
|
+
kramdown (2.5.2)
|
|
103
|
+
rexml (>= 3.4.4)
|
|
97
104
|
kramdown-parser-gfm (1.1.0)
|
|
98
105
|
kramdown (~> 2.0)
|
|
99
106
|
lefthook (1.5.2)
|
|
100
107
|
listen (3.8.0)
|
|
101
108
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
|
102
109
|
rb-inotify (~> 0.9, >= 0.9.10)
|
|
110
|
+
logger (1.7.0)
|
|
103
111
|
lumberjack (1.2.8)
|
|
104
112
|
method_source (1.0.0)
|
|
105
|
-
mini_mime (1.1.
|
|
113
|
+
mini_mime (1.1.5)
|
|
106
114
|
minitest (5.17.0)
|
|
107
115
|
multi_xml (0.6.0)
|
|
108
|
-
nap (1.1.
|
|
116
|
+
nap (1.1.1)
|
|
109
117
|
nenv (0.3.0)
|
|
110
|
-
|
|
118
|
+
net-http (0.10.0)
|
|
119
|
+
net-protocol (>= 0.3.0)
|
|
120
|
+
uri (>= 0.11.1)
|
|
121
|
+
net-protocol (0.4.0)
|
|
122
|
+
timeout
|
|
111
123
|
notiffany (0.1.3)
|
|
112
124
|
nenv (~> 0.1)
|
|
113
125
|
shellany (~> 0.0)
|
|
114
|
-
octokit (
|
|
126
|
+
octokit (10.0.0)
|
|
115
127
|
faraday (>= 1, < 3)
|
|
116
128
|
sawyer (~> 0.9)
|
|
117
129
|
open4 (1.3.4)
|
|
@@ -123,20 +135,22 @@ GEM
|
|
|
123
135
|
coderay
|
|
124
136
|
parser
|
|
125
137
|
unparser
|
|
138
|
+
process_executer (1.1.2)
|
|
126
139
|
pry (0.14.2)
|
|
127
140
|
coderay (~> 1.1)
|
|
128
141
|
method_source (~> 1.0)
|
|
142
|
+
pstore (0.3.0)
|
|
129
143
|
public_suffix (5.0.1)
|
|
130
144
|
racc (1.8.1)
|
|
131
145
|
rack (3.0.4.1)
|
|
132
146
|
rainbow (3.1.1)
|
|
133
|
-
rake (13.
|
|
147
|
+
rake (13.4.2)
|
|
134
148
|
rb-fsevent (0.11.2)
|
|
135
149
|
rb-inotify (0.10.1)
|
|
136
150
|
ffi (~> 1.0)
|
|
137
|
-
rchardet (1.
|
|
151
|
+
rchardet (1.10.2)
|
|
138
152
|
regexp_parser (2.7.0)
|
|
139
|
-
rexml (3.
|
|
153
|
+
rexml (3.4.4)
|
|
140
154
|
rspec (3.12.0)
|
|
141
155
|
rspec-core (~> 3.12.0)
|
|
142
156
|
rspec-expectations (~> 3.12.0)
|
|
@@ -191,21 +205,22 @@ GEM
|
|
|
191
205
|
rubocop-capybara (~> 2.17)
|
|
192
206
|
rubocop-factory_bot (~> 2.22)
|
|
193
207
|
ruby-progressbar (1.11.0)
|
|
194
|
-
|
|
195
|
-
sawyer (0.9.2)
|
|
208
|
+
sawyer (0.9.3)
|
|
196
209
|
addressable (>= 2.3.5)
|
|
197
210
|
faraday (>= 0.17.3, < 3)
|
|
198
211
|
shellany (0.0.1)
|
|
199
|
-
terminal-table (
|
|
200
|
-
unicode-display_width (>= 1.1.1, <
|
|
212
|
+
terminal-table (4.0.0)
|
|
213
|
+
unicode-display_width (>= 1.1.1, < 4)
|
|
201
214
|
thor (1.2.1)
|
|
202
215
|
timecop (0.9.6)
|
|
216
|
+
timeout (0.6.1)
|
|
203
217
|
tzinfo (2.0.6)
|
|
204
218
|
concurrent-ruby (~> 1.0)
|
|
205
219
|
unicode-display_width (2.4.2)
|
|
206
220
|
unparser (0.6.7)
|
|
207
221
|
diff-lcs (~> 1.3)
|
|
208
222
|
parser (>= 3.2.0)
|
|
223
|
+
uri (1.1.2)
|
|
209
224
|
webmock (3.18.1)
|
|
210
225
|
addressable (>= 2.8.0)
|
|
211
226
|
crack (>= 0.3.2)
|
data/gitlab-dangerfiles.gemspec
CHANGED
|
@@ -29,11 +29,7 @@ Gem::Specification.new do |spec|
|
|
|
29
29
|
|
|
30
30
|
spec.add_dependency "rake", "~> 13.0"
|
|
31
31
|
spec.add_dependency "danger-gitlab", ">= 8.0.0"
|
|
32
|
-
spec.add_dependency "danger", ">= 9.
|
|
33
|
-
# git 6.0.0 removed `Git::Base` and made `Git::Log` non-Enumerable, which breaks danger.
|
|
34
|
-
# Remove this cap once a danger release compatible with git 6 is available.
|
|
35
|
-
# See https://gitlab.com/gitlab-org/ruby/gems/gitlab-dangerfiles/-/work_items/108
|
|
36
|
-
spec.add_dependency "git", "< 6"
|
|
32
|
+
spec.add_dependency "danger", ">= 9.6.2"
|
|
37
33
|
|
|
38
34
|
spec.add_development_dependency "climate_control"
|
|
39
35
|
spec.add_development_dependency "gitlab-styles", "~> 10.0"
|
|
@@ -188,7 +188,7 @@ module Danger
|
|
|
188
188
|
check_result = ChangelogCheckResult.empty
|
|
189
189
|
return check_result unless exist?
|
|
190
190
|
|
|
191
|
-
ee_changes =
|
|
191
|
+
ee_changes = self.ee_changes
|
|
192
192
|
|
|
193
193
|
if ee_changes.any? && !ee_changelog? && !required?
|
|
194
194
|
check_result.warning("This MR changes code in `ee/`, but its Changelog commit is missing the [`EE: true` trailer](https://docs.gitlab.com/development/changelog/#gitlab-enterprise-changes). Consider adding it to your Changelog commits.")
|
|
@@ -222,6 +222,14 @@ module Danger
|
|
|
222
222
|
end
|
|
223
223
|
end
|
|
224
224
|
|
|
225
|
+
# Returns the changed files that count as EE code. Projects can override
|
|
226
|
+
# this method to declare additional EE paths.
|
|
227
|
+
#
|
|
228
|
+
# @return [Array<String>]
|
|
229
|
+
def ee_changes
|
|
230
|
+
helper.changed_files(%r{\Aee/})
|
|
231
|
+
end
|
|
232
|
+
|
|
225
233
|
def optional?
|
|
226
234
|
categories_need_changelog? && mr_without_no_changelog_label?
|
|
227
235
|
end
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require "net/http"
|
|
4
4
|
require "json"
|
|
5
|
+
require "open3"
|
|
5
6
|
|
|
6
7
|
require_relative "../../../gitlab/dangerfiles/changes"
|
|
7
8
|
require_relative "../../../gitlab/dangerfiles/config"
|
|
@@ -154,6 +155,35 @@ module Danger
|
|
|
154
155
|
diff.split("\n").select { |line| %r{^[+-]}.match?(line) }
|
|
155
156
|
end
|
|
156
157
|
|
|
158
|
+
# In CI, the file is read as of the MR head commit, not from the merged
|
|
159
|
+
# result in the working tree, so it matches the paths returned by the
|
|
160
|
+
# MR changes API. Locally, the file is read from the working tree.
|
|
161
|
+
#
|
|
162
|
+
# @param filename [String] A file name for which we want the content.
|
|
163
|
+
#
|
|
164
|
+
# @raise [Errno::ENOENT] if the file doesn't exist.
|
|
165
|
+
#
|
|
166
|
+
# @return [String] the content of the file.
|
|
167
|
+
def file_content(filename)
|
|
168
|
+
return File.read(filename) unless ci?
|
|
169
|
+
|
|
170
|
+
content, error, status = Open3.capture3("git", "show", "#{gitlab_helper.head_commit}:#{filename}")
|
|
171
|
+
raise Errno::ENOENT, "#{filename} at #{gitlab_helper.head_commit}: #{error.strip}" unless status.success?
|
|
172
|
+
|
|
173
|
+
content
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# Reads the file as described in {#file_content}.
|
|
177
|
+
#
|
|
178
|
+
# @param filename [String] A file name for which we want the lines.
|
|
179
|
+
#
|
|
180
|
+
# @raise [Errno::ENOENT] if the file doesn't exist.
|
|
181
|
+
#
|
|
182
|
+
# @return [Array<String>] the lines of the file, without line endings.
|
|
183
|
+
def file_lines(filename)
|
|
184
|
+
file_content(filename).lines(chomp: true)
|
|
185
|
+
end
|
|
186
|
+
|
|
157
187
|
def release_automation?
|
|
158
188
|
mr_author == RELEASE_TOOLS_BOT
|
|
159
189
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gitlab-dangerfiles
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.
|
|
4
|
+
version: 4.15.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- GitLab
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-11-
|
|
11
|
+
date: 2026-11-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|
|
@@ -44,28 +44,14 @@ dependencies:
|
|
|
44
44
|
requirements:
|
|
45
45
|
- - ">="
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
|
-
version: 9.
|
|
47
|
+
version: 9.6.2
|
|
48
48
|
type: :runtime
|
|
49
49
|
prerelease: false
|
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
51
|
requirements:
|
|
52
52
|
- - ">="
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
|
-
version: 9.
|
|
55
|
-
- !ruby/object:Gem::Dependency
|
|
56
|
-
name: git
|
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
|
58
|
-
requirements:
|
|
59
|
-
- - "<"
|
|
60
|
-
- !ruby/object:Gem::Version
|
|
61
|
-
version: '6'
|
|
62
|
-
type: :runtime
|
|
63
|
-
prerelease: false
|
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
-
requirements:
|
|
66
|
-
- - "<"
|
|
67
|
-
- !ruby/object:Gem::Version
|
|
68
|
-
version: '6'
|
|
54
|
+
version: 9.6.2
|
|
69
55
|
- !ruby/object:Gem::Dependency
|
|
70
56
|
name: climate_control
|
|
71
57
|
requirement: !ruby/object:Gem::Requirement
|