gitlab-dangerfiles 4.1.0 → 4.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitlab-ci.yml +0 -9
- data/.rubocop.yml +3 -0
- data/.rubocop_todo.yml +5 -0
- data/Gemfile +0 -16
- data/gitlab-dangerfiles.gemspec +11 -4
- data/lib/danger/plugins/roulette.rb +3 -3
- data/lib/danger/rules/simple_roulette/Dangerfile +3 -3
- data/lib/danger/rules/z_add_labels/Dangerfile +2 -2
- data/lib/gitlab/dangerfiles/teammate.rb +4 -4
- data/lib/gitlab/dangerfiles/version.rb +1 -1
- metadata +73 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5721484d3cb437db3c18e94329677c1c170971940a3aa9894f9405d22fc38a7e
|
4
|
+
data.tar.gz: 6df403c9b28c59327d053c75aec9ecb2862cedc201a7ab7191d79dbb8701529b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd1f28e65a9195640bda8ba9277b4c8db884b060009c39589022ebd35e41b6d44434a2eca5d502dc49c294f31ce0fc8542f9cbcfbc25314f0688b8b4286ae645
|
7
|
+
data.tar.gz: 8c3acc9ca82bbcae28741f81c6fa632bee91610bb1ebda8257878ffb704e5a1bf37f06b14d7eaaf03dc489643f4f42357ef27598bc898a54a3cfd1a77a469bc0
|
data/.gitlab-ci.yml
CHANGED
@@ -46,15 +46,6 @@ test:rubocop:
|
|
46
46
|
matrix:
|
47
47
|
- RUBY_VERSION: ['3.0', '3.1', '3.2']
|
48
48
|
|
49
|
-
test:rufo:
|
50
|
-
extends: .default
|
51
|
-
stage: test
|
52
|
-
script:
|
53
|
-
- bundle exec rufo --check .
|
54
|
-
parallel:
|
55
|
-
matrix:
|
56
|
-
- RUBY_VERSION: ['3.0', '3.1', '3.2']
|
57
|
-
|
58
49
|
include:
|
59
50
|
- template: Security/Dependency-Scanning.gitlab-ci.yml
|
60
51
|
- template: Security/SAST.gitlab-ci.yml
|
data/.rubocop.yml
CHANGED
data/.rubocop_todo.yml
CHANGED
@@ -519,3 +519,8 @@ Style/TrailingCommaInArrayLiteral:
|
|
519
519
|
- 'spec/gitlab/dangerfiles/title_linting_spec.rb'
|
520
520
|
- 'spec/gitlab/dangerfiles/weightage/maintainers_spec.rb'
|
521
521
|
- 'spec/gitlab/dangerfiles/weightage/reviewers_spec.rb'
|
522
|
+
|
523
|
+
Style/ArrayIntersect:
|
524
|
+
Exclude:
|
525
|
+
- 'lib/gitlab/dangerfiles/category.rb'
|
526
|
+
- 'lib/danger/plugins/changelog.rb'
|
data/Gemfile
CHANGED
@@ -2,19 +2,3 @@ source "https://rubygems.org"
|
|
2
2
|
|
3
3
|
# Specify your gem's dependencies in gitlab-dangerfiles.gemspec
|
4
4
|
gemspec
|
5
|
-
|
6
|
-
gem "rake", "~> 12.0"
|
7
|
-
gem "guard-rspec"
|
8
|
-
gem "yard"
|
9
|
-
|
10
|
-
group :development do
|
11
|
-
gem "lefthook", require: false
|
12
|
-
end
|
13
|
-
|
14
|
-
group :development, :test do
|
15
|
-
gem "gitlab-styles", "~> 9.0.0", require: false
|
16
|
-
end
|
17
|
-
|
18
|
-
group :test do
|
19
|
-
gem "pry-byebug", "~> 3.8", require: false
|
20
|
-
end
|
data/gitlab-dangerfiles.gemspec
CHANGED
@@ -27,14 +27,21 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
28
28
|
spec.require_paths = ["lib"]
|
29
29
|
|
30
|
-
spec.add_dependency "rake", "
|
30
|
+
spec.add_dependency "rake", "~> 10.2"
|
31
31
|
spec.add_dependency "danger-gitlab", ">= 8.0.0"
|
32
32
|
spec.add_dependency "danger", ">= 9.3.0"
|
33
33
|
|
34
|
-
spec.add_development_dependency "
|
34
|
+
spec.add_development_dependency "climate_control"
|
35
|
+
spec.add_development_dependency "gitlab-styles", "~> 10.0"
|
36
|
+
spec.add_development_dependency "guard-rspec", "~> 4.7.3"
|
37
|
+
spec.add_development_dependency "lefthook", "~> 1.3"
|
35
38
|
spec.add_development_dependency "rspec-parameterized"
|
39
|
+
spec.add_development_dependency "rspec", "~> 3.8"
|
40
|
+
# we do not commit the bundle lockfile, so this temporary workaround needs to be
|
41
|
+
# present until 2.21.3 or 2.22.x is released
|
42
|
+
# See https://gitlab.com/gitlab-org/ruby/gems/gitlab-styles/-/issues/63
|
43
|
+
spec.add_development_dependency "rubocop-rails", "!= 2.21.2"
|
36
44
|
spec.add_development_dependency "timecop"
|
37
45
|
spec.add_development_dependency "webmock"
|
38
|
-
spec.add_development_dependency "
|
39
|
-
spec.add_development_dependency "rufo"
|
46
|
+
spec.add_development_dependency "yard"
|
40
47
|
end
|
@@ -322,9 +322,9 @@ module Danger
|
|
322
322
|
rsp = Net::HTTP.get_response(URI.parse(url))
|
323
323
|
|
324
324
|
if rsp.is_a?(Net::HTTPRedirection)
|
325
|
-
|
326
|
-
|
327
|
-
|
325
|
+
uri = URI.parse(rsp.header["location"])
|
326
|
+
|
327
|
+
uri.query = nil if uri
|
328
328
|
|
329
329
|
warnings << "Redirection detected: #{uri}."
|
330
330
|
return nil
|
@@ -95,9 +95,9 @@ if changes.any?
|
|
95
95
|
|
96
96
|
markdown(MESSAGE)
|
97
97
|
|
98
|
-
|
99
|
-
|
100
|
-
|
98
|
+
warnings = warning_list(roulette)
|
99
|
+
|
100
|
+
markdown(format(WARNING_MESSAGE, warnings: warnings)) if warnings
|
101
101
|
|
102
102
|
markdown(TABLE_MARKDOWN + table_header + rows.join("\n")) unless rows.empty?
|
103
103
|
end
|
@@ -6,8 +6,8 @@ return unless helper.ci?
|
|
6
6
|
|
7
7
|
def post_labels(labels)
|
8
8
|
gitlab.api.update_merge_request(helper.mr_target_project_id,
|
9
|
-
|
10
|
-
|
9
|
+
helper.mr_iid,
|
10
|
+
add_labels: labels.join(","))
|
11
11
|
rescue Gitlab::Error::Forbidden
|
12
12
|
warn("This Merge Request needs to be labelled with #{helper.labels_list(labels)}. Please request a reviewer or maintainer to add them.")
|
13
13
|
end
|
@@ -6,7 +6,7 @@ module Gitlab
|
|
6
6
|
module Dangerfiles
|
7
7
|
class Teammate
|
8
8
|
attr_reader :options, :username, :name, :role, :specialty, :projects, :available, :hungry, :reduced_capacity, :tz_offset_hours,
|
9
|
-
|
9
|
+
:only_maintainer_reviews
|
10
10
|
|
11
11
|
# The options data are produced by https://gitlab.com/gitlab-org/gitlab-roulette/-/blob/main/lib/team_member.rb
|
12
12
|
def initialize(options = {})
|
@@ -14,7 +14,7 @@ module Gitlab
|
|
14
14
|
@username = options["username"]
|
15
15
|
@name = options["name"]
|
16
16
|
@markdown_name = options["markdown_name"] ||
|
17
|
-
default_markdown_name(
|
17
|
+
default_markdown_name(options["username"])
|
18
18
|
@role = options["role"]
|
19
19
|
@specialty = options["specialty"]
|
20
20
|
@projects = process_projects(options["projects"])
|
@@ -89,8 +89,8 @@ module Gitlab
|
|
89
89
|
|
90
90
|
private
|
91
91
|
|
92
|
-
def default_markdown_name(username
|
93
|
-
"[
|
92
|
+
def default_markdown_name(username)
|
93
|
+
"[`#{username}`](https://gitlab.com/#{username})"
|
94
94
|
end
|
95
95
|
|
96
96
|
def process_projects(projects)
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitlab-dangerfiles
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.1
|
4
|
+
version: 4.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GitLab
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-10-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '10.2'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '10.2'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: danger-gitlab
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -53,19 +53,61 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 9.3.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: climate_control
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: gitlab-styles
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '10.0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '10.0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: guard-rspec
|
57
85
|
requirement: !ruby/object:Gem::Requirement
|
58
86
|
requirements:
|
59
87
|
- - "~>"
|
60
88
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
89
|
+
version: 4.7.3
|
62
90
|
type: :development
|
63
91
|
prerelease: false
|
64
92
|
version_requirements: !ruby/object:Gem::Requirement
|
65
93
|
requirements:
|
66
94
|
- - "~>"
|
67
95
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
96
|
+
version: 4.7.3
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: lefthook
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '1.3'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '1.3'
|
69
111
|
- !ruby/object:Gem::Dependency
|
70
112
|
name: rspec-parameterized
|
71
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -81,21 +123,35 @@ dependencies:
|
|
81
123
|
- !ruby/object:Gem::Version
|
82
124
|
version: '0'
|
83
125
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
126
|
+
name: rspec
|
85
127
|
requirement: !ruby/object:Gem::Requirement
|
86
128
|
requirements:
|
87
|
-
- - "
|
129
|
+
- - "~>"
|
88
130
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
131
|
+
version: '3.8'
|
90
132
|
type: :development
|
91
133
|
prerelease: false
|
92
134
|
version_requirements: !ruby/object:Gem::Requirement
|
93
135
|
requirements:
|
94
|
-
- - "
|
136
|
+
- - "~>"
|
95
137
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
138
|
+
version: '3.8'
|
97
139
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
140
|
+
name: rubocop-rails
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "!="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: 2.21.2
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "!="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: 2.21.2
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: timecop
|
99
155
|
requirement: !ruby/object:Gem::Requirement
|
100
156
|
requirements:
|
101
157
|
- - ">="
|
@@ -109,7 +165,7 @@ dependencies:
|
|
109
165
|
- !ruby/object:Gem::Version
|
110
166
|
version: '0'
|
111
167
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
168
|
+
name: webmock
|
113
169
|
requirement: !ruby/object:Gem::Requirement
|
114
170
|
requirements:
|
115
171
|
- - ">="
|
@@ -123,7 +179,7 @@ dependencies:
|
|
123
179
|
- !ruby/object:Gem::Version
|
124
180
|
version: '0'
|
125
181
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
182
|
+
name: yard
|
127
183
|
requirement: !ruby/object:Gem::Requirement
|
128
184
|
requirements:
|
129
185
|
- - ">="
|