gitlab-triage 1.42.1 → 1.42.2

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
  SHA256:
3
- metadata.gz: 4b58096f8556f0fceef5cb4ad808627438bbbad5962902ac4cebfdf01b20d28b
4
- data.tar.gz: 1678304df863fa81f4977551d1e204efbbeb1befd8ab0a829feb51c5b843ddc0
3
+ metadata.gz: 6d705552fab77f42d9e1ebda9904fe44eb20e492fbafd90974d9128a386f6a13
4
+ data.tar.gz: a2f2ee59444bed7c6a1f9216f166bf5c859e805bbd2ab67d18e6d39defbd6f41
5
5
  SHA512:
6
- metadata.gz: ea8a58b37b831b5ed2bc4194358696b55d63bb4250a1f0b8683437d68a8937660017bc497a7c6dc77090593bcb30f603f695a64472ecc4400264513be1bf53df
7
- data.tar.gz: 8a636467bd94cf03817d97810a5cc082946631586f00c6e82d4ef1f83d7eda5809e113ac6edb61541e9db56333a9d01d67fb49b581dfdc1f36ef18b6bd5aa555
6
+ metadata.gz: 410ee77b0892b8ab5de4bf8f143e1dd4b6a0957288f2b4022e562fb8cdd1f8b1c089b3466a9140dc4cab1aa6e46ff3f1eea7689953691deac905191d7390f863
7
+ data.tar.gz: 0dd940ceca61a8966f1feb4d9c9442e06f71538fed657703720b7e118674900419c1af26e4d479b59f97dbc8386b94e90ebb95bdee8a86138406a355bb2c5783
data/.rubocop.yml CHANGED
@@ -12,11 +12,15 @@ AllCops:
12
12
  - 'tmp/**/*'
13
13
  CacheRootDirectory: tmp
14
14
 
15
- Rails/Output:
16
- Enabled: false
17
-
18
15
  Layout/LineLength:
19
16
  Max: 152
20
17
 
21
18
  Style/SingleArgumentDig:
22
19
  Enabled: false
20
+
21
+ GitlabSecurity/PublicSend:
22
+ Enabled: true
23
+ Exclude:
24
+ # FIXME: this is not an entirely good practice and we should aim to correct these!
25
+ # See https://gitlab.com/gitlab-org/ruby/gems/gitlab-triage/-/issues/342
26
+ - 'spec/**/*.rb'
data/.rubocop_todo.yml CHANGED
@@ -1,12 +1,12 @@
1
1
  # This configuration was generated by
2
- # `rubocop --auto-gen-config`
3
- # on 2022-05-26 15:15:19 UTC using RuboCop version 0.93.1.
2
+ # `rubocop --auto-gen-config --exclude-limit 10000`
3
+ # on 2023-10-05 17:28:54 UTC using RuboCop version 1.50.2.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
- # Offense count: 43
9
+ # Offense count: 62
10
10
  CodeReuse/ActiveRecord:
11
11
  Exclude:
12
12
  - 'lib/gitlab/triage/engine.rb'
@@ -14,70 +14,257 @@ CodeReuse/ActiveRecord:
14
14
  - 'spec/gitlab/triage/engine_spec.rb'
15
15
  - 'spec/gitlab/triage/graphql_network_spec.rb'
16
16
  - 'spec/gitlab/triage/network_adapters/graphql_adapter_spec.rb'
17
- - 'spec/gitlab/triage/rest_api_network_spec.rb'
18
17
  - 'spec/gitlab/triage/policies/rule_policy_spec.rb'
19
18
  - 'spec/gitlab/triage/resource/label_spec.rb'
19
+ - 'spec/gitlab/triage/rest_api_network_spec.rb'
20
20
  - 'spec/support/expect_next_instance_of.rb'
21
21
  - 'spec/support/shared_examples/issuable_shared_examples.rb'
22
22
  - 'spec/support/shared_examples/label_command_shared_examples.rb'
23
23
  - 'spec/support/stub_api.rb'
24
24
 
25
- # Offense count: 1
26
- # Cop supports --auto-correct.
25
+ # Offense count: 2
26
+ # This cop supports safe autocorrection (--autocorrect).
27
27
  Cop/LineBreakAroundConditionalBlock:
28
28
  Exclude:
29
29
  - 'lib/gitlab/triage/engine.rb'
30
30
 
31
31
  # Offense count: 1
32
- # Configuration parameters: Include.
32
+ # This cop supports safe autocorrection (--autocorrect).
33
+ # Configuration parameters: Severity, Include.
33
34
  # Include: **/*.gemspec
34
- Gemspec/RequiredRubyVersion:
35
+ Gemspec/RequireMFA:
35
36
  Exclude:
36
37
  - 'gitlab-triage.gemspec'
37
38
 
38
39
  # Offense count: 1
39
- # Cop supports --auto-correct.
40
- Lint/NonDeterministicRequireOrder:
40
+ GitlabSecurity/PublicSend:
41
41
  Exclude:
42
- - 'spec/spec_helper.rb'
42
+ - 'lib/gitlab/triage/network_adapters/graphql_adapter.rb'
43
+
44
+ # Offense count: 11
45
+ # This cop supports safe autocorrection (--autocorrect).
46
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
47
+ # SupportedStyles: with_first_argument, with_fixed_indentation
48
+ Layout/ArgumentAlignment:
49
+ Exclude:
50
+ - 'lib/gitlab/triage/command_builders/label_command_builder.rb'
51
+ - 'spec/gitlab/triage/action_spec.rb'
52
+ - 'spec/gitlab/triage/engine_spec.rb'
53
+
54
+ # Offense count: 2
55
+ # This cop supports safe autocorrection (--autocorrect).
56
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
57
+ # SupportedStyles: with_first_element, with_fixed_indentation
58
+ Layout/ArrayAlignment:
59
+ Exclude:
60
+ - 'spec/gitlab/triage/graphql_network_spec.rb'
61
+
62
+ # Offense count: 1
63
+ # This cop supports safe autocorrection (--autocorrect).
64
+ Layout/EmptyLineAfterMagicComment:
65
+ Exclude:
66
+ - 'spec/integration/comment_on_group_resources_spec.rb'
67
+
68
+ # Offense count: 2
69
+ # This cop supports safe autocorrection (--autocorrect).
70
+ # Configuration parameters: IndentationWidth.
71
+ # SupportedStyles: special_inside_parentheses, consistent, align_brackets
72
+ Layout/FirstArrayElementIndentation:
73
+ EnforcedStyle: special_inside_parentheses
74
+
75
+ # Offense count: 8
76
+ # This cop supports safe autocorrection (--autocorrect).
77
+ # Configuration parameters: AllowInHeredoc.
78
+ Layout/TrailingWhitespace:
79
+ Exclude:
80
+ - 'spec/integration/redact_confidentials_spec.rb'
81
+
82
+ # Offense count: 16
83
+ # This cop supports safe autocorrection (--autocorrect).
84
+ Lint/DuplicateRegexpCharacterClassElement:
85
+ Exclude:
86
+ - 'spec/gitlab/triage/api_query_builders/multi_query_param_builder_spec.rb'
87
+ - 'spec/gitlab/triage/api_query_builders/single_query_param_builder_spec.rb'
88
+
89
+ # Offense count: 9
90
+ # Configuration parameters: AllowComments, AllowEmptyLambdas.
91
+ Lint/EmptyBlock:
92
+ Exclude:
93
+ - 'spec/gitlab/triage/entity_builders/issue_builder_spec.rb'
94
+ - 'spec/gitlab/triage/entity_builders/summary_builder_spec.rb'
95
+ - 'spec/gitlab/triage/resource/context_spec.rb'
96
+ - 'spec/gitlab/triage/resource/issue_spec.rb'
97
+ - 'spec/gitlab/triage/resource/milestone_spec.rb'
98
+
99
+ # Offense count: 2
100
+ # This cop supports safe autocorrection (--autocorrect).
101
+ # Configuration parameters: EnforcedStyle.
102
+ # SupportedStyles: strict, consistent
103
+ Lint/SymbolConversion:
104
+ Exclude:
105
+ - 'spec/gitlab/triage/action/comment_on_summary_spec.rb'
43
106
 
44
107
  # Offense count: 1
45
- # Configuration parameters: IgnoredMethods.
46
- Metrics/AbcSize:
47
- Max: 57
108
+ Lint/ToEnumArguments:
109
+ Exclude:
110
+ - 'lib/gitlab/triage/engine.rb'
111
+
112
+ # Offense count: 3
113
+ # This cop supports safe autocorrection (--autocorrect).
114
+ # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods.
115
+ Lint/UnusedMethodArgument:
116
+ Exclude:
117
+ - 'lib/gitlab/triage/network_adapters/test_adapter.rb'
48
118
 
49
119
  # Offense count: 1
50
- # Cop supports --auto-correct.
120
+ # This cop supports safe autocorrection (--autocorrect).
51
121
  Performance/ConstantRegexp:
52
122
  Exclude:
53
123
  - 'lib/gitlab/triage/command_builders/text_content_builder.rb'
54
124
 
55
125
  # Offense count: 2
56
- # Cop supports --auto-correct.
126
+ # This cop supports unsafe autocorrection (--autocorrect-all).
57
127
  # Configuration parameters: SafeMultiline.
58
128
  Performance/DeleteSuffix:
59
129
  Exclude:
60
130
  - 'lib/gitlab/triage/api_query_builders/date_query_param_builder.rb'
61
131
  - 'lib/gitlab/triage/graphql_queries/query_param_builders/date_param_builder.rb'
62
132
 
63
- # Offense count: 5
133
+ # Offense count: 4
64
134
  Performance/MethodObjectAsBlock:
65
135
  Exclude:
66
136
  - 'lib/gitlab/triage/engine.rb'
67
- - 'lib/gitlab/triage/entity_builders/issue_builder.rb'
68
137
  - 'lib/gitlab/triage/expand_condition.rb'
69
138
  - 'lib/gitlab/triage/expand_condition/expansion.rb'
70
139
  - 'lib/gitlab/triage/limiters/date_field_limiter.rb'
71
140
 
72
- # Offense count: 31
73
- # Cop supports --auto-correct.
141
+ # Offense count: 36
142
+ # This cop supports unsafe autocorrection (--autocorrect-all).
143
+ RSpec/BeEq:
144
+ Exclude:
145
+ - 'spec/gitlab/triage/api_query_builders/date_query_param_builder_spec.rb'
146
+ - 'spec/gitlab/triage/engine_spec.rb'
147
+ - 'spec/gitlab/triage/filters/branch_date_filter_spec.rb'
148
+ - 'spec/gitlab/triage/filters/discussions_conditions_filter_spec.rb'
149
+ - 'spec/gitlab/triage/filters/issue_date_conditions_filter_spec.rb'
150
+ - 'spec/gitlab/triage/filters/merge_request_date_conditions_filter_spec.rb'
151
+ - 'spec/gitlab/triage/filters/votes_conditions_filter_spec.rb'
152
+ - 'spec/gitlab/triage/network_adapters/httparty_adapter_spec.rb'
153
+ - 'spec/gitlab/triage/resource/base_spec.rb'
154
+ - 'spec/gitlab/triage/resource/label_spec.rb'
155
+ - 'spec/gitlab/triage/resource/merge_request_spec.rb'
156
+ - 'spec/support/shared_examples/issuable_date_filter_shared_examples.rb'
157
+ - 'spec/support/shared_examples/member_filter_shared_examples.rb'
158
+
159
+ # Offense count: 3
160
+ # This cop supports safe autocorrection (--autocorrect).
161
+ # Configuration parameters: EnforcedStyle.
162
+ # SupportedStyles: be, be_nil
163
+ RSpec/BeNil:
164
+ Exclude:
165
+ - 'spec/gitlab/triage/option_parser_spec.rb'
166
+
167
+ # Offense count: 45
168
+ # This cop supports safe autocorrection (--autocorrect).
74
169
  RSpec/EmptyLineAfterLetBlock:
75
- Enabled: false
170
+ Exclude:
171
+ - 'spec/gitlab/triage/action/comment_on_summary_spec.rb'
172
+ - 'spec/gitlab/triage/action/comment_spec.rb'
173
+ - 'spec/gitlab/triage/action/issue_spec.rb'
174
+ - 'spec/gitlab/triage/action/summarize_spec.rb'
175
+ - 'spec/gitlab/triage/action_spec.rb'
176
+ - 'spec/gitlab/triage/filters/branch_date_filter_spec.rb'
177
+ - 'spec/gitlab/triage/filters/discussions_conditions_filter_spec.rb'
178
+ - 'spec/gitlab/triage/filters/issue_date_conditions_filter_spec.rb'
179
+ - 'spec/gitlab/triage/filters/merge_request_date_conditions_filter_spec.rb'
180
+ - 'spec/gitlab/triage/filters/ruby_conditions_filter_spec.rb'
181
+ - 'spec/gitlab/triage/filters/votes_conditions_filter_spec.rb'
182
+ - 'spec/gitlab/triage/limiters/date_field_limiter_spec.rb'
183
+ - 'spec/gitlab/triage/network_adapters/httparty_adapter_spec.rb'
184
+ - 'spec/gitlab/triage/rest_api_network_spec.rb'
185
+ - 'spec/integration/filter_by_votes_spec.rb'
186
+ - 'spec/integration/select_issues_by_created_at_spec.rb'
187
+ - 'spec/integration/select_issues_by_health_status_spec.rb'
188
+ - 'spec/integration/select_issues_by_issue_type_spec.rb'
189
+ - 'spec/integration/select_issues_by_iteration_spec.rb'
190
+ - 'spec/integration/select_issues_by_updated_at_spec.rb'
191
+ - 'spec/integration/select_issues_by_weight_spec.rb'
192
+ - 'spec/integration/select_merge_requests_by_created_at_spec.rb'
193
+ - 'spec/integration/select_merge_requests_by_draft_spec.rb'
194
+ - 'spec/integration/select_merge_requests_by_merged_at_spec.rb'
195
+ - 'spec/integration/select_merge_requests_by_reviewer_id_spec.rb'
196
+ - 'spec/integration/select_merge_requests_by_source_branch_spec.rb'
197
+ - 'spec/integration/select_merge_requests_by_updated_at_spec.rb'
198
+ - 'spec/support/epic_stubs.rb'
199
+ - 'spec/support/issue_stubs.rb'
200
+ - 'spec/support/merge_request_stubs.rb'
201
+ - 'spec/support/shared_examples/label_command_shared_examples.rb'
202
+ - 'spec/support/shared_examples/member_filter_shared_examples.rb'
203
+
204
+ # Offense count: 1
205
+ # This cop supports safe autocorrection (--autocorrect).
206
+ RSpec/ExcessiveDocstringSpacing:
207
+ Exclude:
208
+ - 'spec/gitlab/triage/filters/branch_date_filter_spec.rb'
209
+
210
+ # Offense count: 4
211
+ # Configuration parameters: Max, AllowedIdentifiers, AllowedPatterns.
212
+ RSpec/IndexedLet:
213
+ Exclude:
214
+ - 'spec/integration/select_issues_by_weight_spec.rb'
215
+ - 'spec/integration/select_merge_requests_by_source_branch_spec.rb'
76
216
 
77
- # Offense count: 93
217
+ # Offense count: 167
78
218
  # Configuration parameters: AllowSubject.
79
219
  RSpec/MultipleMemoizedHelpers:
80
- Max: 12
220
+ Max: 10
221
+
222
+ # Offense count: 10
223
+ # Configuration parameters: AllowedPatterns.
224
+ # AllowedPatterns: ^expect_, ^assert_
225
+ RSpec/NoExpectationExample:
226
+ Exclude:
227
+ - 'spec/integration/filter_by_votes_spec.rb'
228
+ - 'spec/integration/generate_summary_spec.rb'
229
+ - 'spec/integration/no_newline_in_titles_spec.rb'
230
+ - 'spec/integration/redact_confidentials_spec.rb'
231
+ - 'spec/integration/summary_policies_spec.rb'
232
+
233
+ # Offense count: 10
234
+ # This cop supports unsafe autocorrection (--autocorrect-all).
235
+ RSpec/Rails/TravelAround:
236
+ Exclude:
237
+ - 'spec/gitlab/triage/api_query_builders/date_query_param_builder_spec.rb'
238
+ - 'spec/gitlab/triage/filters/branch_date_filter_spec.rb'
239
+ - 'spec/gitlab/triage/filters/issue_date_conditions_filter_spec.rb'
240
+ - 'spec/gitlab/triage/filters/merge_request_date_conditions_filter_spec.rb'
241
+ - 'spec/gitlab/triage/graphql_queries/query_builder_spec.rb'
242
+ - 'spec/integration/select_issues_by_created_at_spec.rb'
243
+ - 'spec/integration/select_issues_by_updated_at_spec.rb'
244
+ - 'spec/integration/select_merge_requests_by_created_at_spec.rb'
245
+ - 'spec/integration/select_merge_requests_by_updated_at_spec.rb'
246
+
247
+ # Offense count: 2
248
+ # This cop supports safe autocorrection (--autocorrect).
249
+ RSpec/SortMetadata:
250
+ Exclude:
251
+ - 'spec/support/shared_examples/filters_shared_examples.rb'
252
+ - 'spec/support/shared_examples/issuable_date_filter_shared_examples.rb'
253
+
254
+ # Offense count: 1
255
+ # Configuration parameters: Include.
256
+ # Include: **/*_spec*rb*, **/spec/**/*
257
+ RSpec/SpecFilePathSuffix:
258
+ Exclude:
259
+ - 'spec/integration/issue_action_policy.rb'
260
+
261
+ # Offense count: 8
262
+ # This cop supports unsafe autocorrection (--autocorrect-all).
263
+ # Configuration parameters: EnforcedStyle.
264
+ # SupportedStyles: constant, string
265
+ RSpec/VerifiedDoubleReference:
266
+ Exclude:
267
+ - 'spec/gitlab/triage/engine_spec.rb'
81
268
 
82
269
  # Offense count: 12
83
270
  # Configuration parameters: IgnoreNameless, IgnoreSymbolicNames.
@@ -89,57 +276,242 @@ RSpec/VerifiedDoubles:
89
276
  - 'spec/support/shared_examples/label_command_shared_examples.rb'
90
277
 
91
278
  # Offense count: 1
92
- # Cop supports --auto-correct.
279
+ # This cop supports safe autocorrection (--autocorrect).
93
280
  Rails/IndexBy:
94
281
  Exclude:
95
282
  - 'lib/gitlab/triage/engine.rb'
96
283
 
97
284
  # Offense count: 1
98
- # Cop supports --auto-correct.
285
+ # This cop supports unsafe autocorrection (--autocorrect-all).
99
286
  Rails/NegateInclude:
100
287
  Exclude:
101
288
  - 'lib/gitlab/triage/filters/member_conditions_filter.rb'
102
289
 
290
+ # Offense count: 56
291
+ # This cop supports unsafe autocorrection (--autocorrect-all).
292
+ # Configuration parameters: Include.
293
+ # Include: app/**/*.rb, config/**/*.rb, db/**/*.rb, lib/**/*.rb
294
+ Rails/Output:
295
+ Exclude:
296
+ - 'lib/gitlab/triage/action/comment.rb'
297
+ - 'lib/gitlab/triage/action/comment_on_summary.rb'
298
+ - 'lib/gitlab/triage/action/delete.rb'
299
+ - 'lib/gitlab/triage/action/issue.rb'
300
+ - 'lib/gitlab/triage/action/summarize.rb'
301
+ - 'lib/gitlab/triage/engine.rb'
302
+ - 'lib/gitlab/triage/graphql_network.rb'
303
+ - 'lib/gitlab/triage/network_adapters/graphql_adapter.rb'
304
+ - 'lib/gitlab/triage/network_adapters/httparty_adapter.rb'
305
+ - 'lib/gitlab/triage/option_parser.rb'
306
+ - 'lib/gitlab/triage/rest_api_network.rb'
307
+ - 'lib/gitlab/triage/retryable.rb'
308
+
103
309
  # Offense count: 3
104
- # Cop supports --auto-correct.
310
+ # This cop supports unsafe autocorrection (--autocorrect-all).
105
311
  Rails/Pluck:
106
312
  Exclude:
107
313
  - 'lib/gitlab/triage/filters/base_conditions_filter.rb'
108
314
  - 'lib/gitlab/triage/filters/member_conditions_filter.rb'
109
315
  - 'lib/gitlab/triage/validators/limiter_validator.rb'
110
316
 
111
- # Offense count: 2
112
- # Cop supports --auto-correct.
113
- Style/ArrayCoercion:
317
+ # Offense count: 1
318
+ Style/DocumentDynamicEvalDefinition:
114
319
  Exclude:
115
- - 'lib/gitlab/triage/graphql_network.rb'
320
+ - 'lib/gitlab/triage/resource/context.rb'
116
321
 
117
322
  # Offense count: 1
118
- # Cop supports --auto-correct.
323
+ # This cop supports safe autocorrection (--autocorrect).
119
324
  Style/ExplicitBlockArgument:
120
325
  Exclude:
121
326
  - 'spec/support/expect_next_instance_of.rb'
122
327
 
123
- # Offense count: 115
124
- # Cop supports --auto-correct.
328
+ # Offense count: 130
329
+ # This cop supports unsafe autocorrection (--autocorrect-all).
125
330
  # Configuration parameters: EnforcedStyle.
126
331
  # SupportedStyles: always, always_true, never
127
332
  Style/FrozenStringLiteralComment:
128
- Enabled: false
333
+ Exclude:
334
+ - 'Gemfile'
335
+ - 'Guardfile'
336
+ - 'Rakefile'
337
+ - 'bin/gitlab-triage'
338
+ - 'gitlab-triage.gemspec'
339
+ - 'lib/gitlab/triage.rb'
340
+ - 'lib/gitlab/triage/action.rb'
341
+ - 'lib/gitlab/triage/action/base.rb'
342
+ - 'lib/gitlab/triage/api_query_builders/base_query_param_builder.rb'
343
+ - 'lib/gitlab/triage/api_query_builders/date_query_param_builder.rb'
344
+ - 'lib/gitlab/triage/api_query_builders/multi_query_param_builder.rb'
345
+ - 'lib/gitlab/triage/api_query_builders/single_query_param_builder.rb'
346
+ - 'lib/gitlab/triage/command_builders/base_command_builder.rb'
347
+ - 'lib/gitlab/triage/command_builders/cc_command_builder.rb'
348
+ - 'lib/gitlab/triage/command_builders/comment_command_builder.rb'
349
+ - 'lib/gitlab/triage/command_builders/label_command_builder.rb'
350
+ - 'lib/gitlab/triage/command_builders/move_command_builder.rb'
351
+ - 'lib/gitlab/triage/command_builders/remove_label_command_builder.rb'
352
+ - 'lib/gitlab/triage/command_builders/status_command_builder.rb'
353
+ - 'lib/gitlab/triage/engine.rb'
354
+ - 'lib/gitlab/triage/errors.rb'
355
+ - 'lib/gitlab/triage/errors/network.rb'
356
+ - 'lib/gitlab/triage/expand_condition.rb'
357
+ - 'lib/gitlab/triage/expand_condition/expansion.rb'
358
+ - 'lib/gitlab/triage/expand_condition/list.rb'
359
+ - 'lib/gitlab/triage/expand_condition/sequence.rb'
360
+ - 'lib/gitlab/triage/filters/assignee_member_conditions_filter.rb'
361
+ - 'lib/gitlab/triage/filters/author_member_conditions_filter.rb'
362
+ - 'lib/gitlab/triage/filters/base_conditions_filter.rb'
363
+ - 'lib/gitlab/triage/filters/branch_date_filter.rb'
364
+ - 'lib/gitlab/triage/filters/branch_protected_filter.rb'
365
+ - 'lib/gitlab/triage/filters/discussions_conditions_filter.rb'
366
+ - 'lib/gitlab/triage/filters/issue_date_conditions_filter.rb'
367
+ - 'lib/gitlab/triage/filters/member_conditions_filter.rb'
368
+ - 'lib/gitlab/triage/filters/merge_request_date_conditions_filter.rb'
369
+ - 'lib/gitlab/triage/filters/name_conditions_filter.rb'
370
+ - 'lib/gitlab/triage/filters/no_additional_labels_conditions_filter.rb'
371
+ - 'lib/gitlab/triage/filters/ruby_conditions_filter.rb'
372
+ - 'lib/gitlab/triage/filters/votes_conditions_filter.rb'
373
+ - 'lib/gitlab/triage/graphql_network.rb'
374
+ - 'lib/gitlab/triage/graphql_queries/query_builder.rb'
375
+ - 'lib/gitlab/triage/graphql_queries/query_param_builders/array_param_builder.rb'
376
+ - 'lib/gitlab/triage/graphql_queries/query_param_builders/base_param_builder.rb'
377
+ - 'lib/gitlab/triage/graphql_queries/query_param_builders/date_param_builder.rb'
378
+ - 'lib/gitlab/triage/limiters/base_limiter.rb'
379
+ - 'lib/gitlab/triage/limiters/date_field_limiter.rb'
380
+ - 'lib/gitlab/triage/network.rb'
381
+ - 'lib/gitlab/triage/network_adapters/base_adapter.rb'
382
+ - 'lib/gitlab/triage/network_adapters/graphql_adapter.rb'
383
+ - 'lib/gitlab/triage/network_adapters/httparty_adapter.rb'
384
+ - 'lib/gitlab/triage/network_adapters/test_adapter.rb'
385
+ - 'lib/gitlab/triage/option_parser.rb'
386
+ - 'lib/gitlab/triage/options.rb'
387
+ - 'lib/gitlab/triage/param_builders/date_param_builder.rb'
388
+ - 'lib/gitlab/triage/resource/instance_version.rb'
389
+ - 'lib/gitlab/triage/resource/milestone.rb'
390
+ - 'lib/gitlab/triage/rest_api_network.rb'
391
+ - 'lib/gitlab/triage/retryable.rb'
392
+ - 'lib/gitlab/triage/ui.rb'
393
+ - 'lib/gitlab/triage/url_builders/url_builder.rb'
394
+ - 'lib/gitlab/triage/utils.rb'
395
+ - 'lib/gitlab/triage/validators/limiter_validator.rb'
396
+ - 'lib/gitlab/triage/validators/params_validator.rb'
397
+ - 'spec/gitlab/triage/action/comment_on_summary_spec.rb'
398
+ - 'spec/gitlab/triage/action/comment_spec.rb'
399
+ - 'spec/gitlab/triage/action/delete_spec.rb'
400
+ - 'spec/gitlab/triage/action/issue_spec.rb'
401
+ - 'spec/gitlab/triage/action/summarize_spec.rb'
402
+ - 'spec/gitlab/triage/action_spec.rb'
403
+ - 'spec/gitlab/triage/api_query_builders/date_query_param_builder_spec.rb'
404
+ - 'spec/gitlab/triage/api_query_builders/multi_query_param_builder_spec.rb'
405
+ - 'spec/gitlab/triage/api_query_builders/single_query_param_builder_spec.rb'
406
+ - 'spec/gitlab/triage/command_builders/cc_command_builder_spec.rb'
407
+ - 'spec/gitlab/triage/command_builders/comment_command_builder_spec.rb'
408
+ - 'spec/gitlab/triage/command_builders/label_command_builder_spec.rb'
409
+ - 'spec/gitlab/triage/command_builders/move_command_builder_spec.rb'
410
+ - 'spec/gitlab/triage/command_builders/remove_label_command_builder_spec.rb'
411
+ - 'spec/gitlab/triage/command_builders/status_command_builder_spec.rb'
412
+ - 'spec/gitlab/triage/command_builders/text_content_builder_spec.rb'
413
+ - 'spec/gitlab/triage/engine_spec.rb'
414
+ - 'spec/gitlab/triage/entity_builders/issue_builder_spec.rb'
415
+ - 'spec/gitlab/triage/entity_builders/summary_builder_spec.rb'
416
+ - 'spec/gitlab/triage/expand_condition/expansion_spec.rb'
417
+ - 'spec/gitlab/triage/expand_condition/list_spec.rb'
418
+ - 'spec/gitlab/triage/expand_condition/sequence_spec.rb'
419
+ - 'spec/gitlab/triage/expand_condition_spec.rb'
420
+ - 'spec/gitlab/triage/filters/assignee_member_conditions_filter_spec.rb'
421
+ - 'spec/gitlab/triage/filters/author_member_conditions_filter_spec.rb'
422
+ - 'spec/gitlab/triage/filters/branch_date_filter_spec.rb'
423
+ - 'spec/gitlab/triage/filters/discussions_conditions_filter_spec.rb'
424
+ - 'spec/gitlab/triage/filters/issue_date_conditions_filter_spec.rb'
425
+ - 'spec/gitlab/triage/filters/merge_request_date_conditions_filter_spec.rb'
426
+ - 'spec/gitlab/triage/filters/no_additional_labels_conditions_filter_spec.rb'
427
+ - 'spec/gitlab/triage/filters/ruby_conditions_filter_spec.rb'
428
+ - 'spec/gitlab/triage/filters/votes_conditions_filter_spec.rb'
429
+ - 'spec/gitlab/triage/graphql_network_spec.rb'
430
+ - 'spec/gitlab/triage/graphql_queries/query_builder_spec.rb'
431
+ - 'spec/gitlab/triage/limiters/date_field_limiter_spec.rb'
432
+ - 'spec/gitlab/triage/network_adapters/graphql_adapter_spec.rb'
433
+ - 'spec/gitlab/triage/network_adapters/httparty_adapter_spec.rb'
434
+ - 'spec/gitlab/triage/policies/base_policy_spec.rb'
435
+ - 'spec/gitlab/triage/policies/rule_policy_spec.rb'
436
+ - 'spec/gitlab/triage/policies/summary_policy_spec.rb'
437
+ - 'spec/gitlab/triage/resource/instance_version_spec.rb'
438
+ - 'spec/gitlab/triage/resource/label_event_spec.rb'
439
+ - 'spec/gitlab/triage/resource/label_spec.rb'
440
+ - 'spec/gitlab/triage/resource/milestone_spec.rb'
441
+ - 'spec/gitlab/triage/rest_api_network_spec.rb'
442
+ - 'spec/gitlab/triage/retryable_spec.rb'
443
+ - 'spec/gitlab/triage/ui_spec.rb'
444
+ - 'spec/gitlab/triage/url_builders/url_builder_spec.rb'
445
+ - 'spec/gitlab/triage/utils_spec.rb'
446
+ - 'spec/spec_helper.rb'
447
+ - 'spec/support/epic_stubs.rb'
448
+ - 'spec/support/expect_next_instance_of.rb'
449
+ - 'spec/support/group_stubs.rb'
450
+ - 'spec/support/issue_stubs.rb'
451
+ - 'spec/support/merge_request_stubs.rb'
452
+ - 'spec/support/project_stubs.rb'
453
+ - 'spec/support/shared_context/graphql_network.rb'
454
+ - 'spec/support/shared_context/network.rb'
455
+ - 'spec/support/shared_context/stubs.rb'
456
+ - 'spec/support/shared_examples/filters_shared_examples.rb'
457
+ - 'spec/support/shared_examples/issuable_date_filter_shared_examples.rb'
458
+ - 'spec/support/shared_examples/issuable_shared_examples.rb'
459
+ - 'spec/support/shared_examples/label_command_shared_examples.rb'
460
+ - 'spec/support/shared_examples/member_filter_shared_examples.rb'
461
+ - 'spec/support/shared_examples/resource_fields_examples.rb'
462
+ - 'spec/support/stub_api.rb'
463
+ - 'spec/support/user_stubs.rb'
129
464
 
130
465
  # Offense count: 5
131
466
  Style/OpenStructUse:
132
467
  Exclude:
133
468
  - 'spec/gitlab/triage/network_adapters/httparty_adapter_spec.rb'
134
469
 
470
+ # Offense count: 3
471
+ # This cop supports safe autocorrection (--autocorrect).
472
+ # Configuration parameters: EnforcedStyle.
473
+ # SupportedStyles: same_as_string_literals, single_quotes, double_quotes
474
+ Style/QuotedSymbols:
475
+ Exclude:
476
+ - 'spec/gitlab/triage/network_adapters/httparty_adapter_spec.rb'
477
+
478
+ # Offense count: 3
479
+ # This cop supports safe autocorrection (--autocorrect).
480
+ Style/RedundantFreeze:
481
+ Exclude:
482
+ - 'lib/gitlab/triage/command_builders/text_content_builder.rb'
483
+ - 'lib/gitlab/triage/expand_condition/list.rb'
484
+ - 'lib/gitlab/triage/expand_condition/sequence.rb'
485
+
135
486
  # Offense count: 1
136
- # Cop supports --auto-correct.
487
+ # This cop supports safe autocorrection (--autocorrect).
137
488
  Style/RedundantRegexpEscape:
138
489
  Exclude:
139
490
  - 'lib/gitlab/triage/command_builders/text_content_builder.rb'
140
491
 
141
492
  # Offense count: 1
493
+ # This cop supports safe autocorrection (--autocorrect).
494
+ Style/RedundantStringEscape:
495
+ Exclude:
496
+ - 'spec/gitlab/triage/entity_builders/summary_builder_spec.rb'
497
+
498
+ # Offense count: 1
499
+ # This cop supports unsafe autocorrection (--autocorrect-all).
500
+ Style/SelectByRegexp:
501
+ Exclude:
502
+ - 'gitlab-triage.gemspec'
503
+
504
+ # Offense count: 1
505
+ # This cop supports safe autocorrection (--autocorrect).
142
506
  # Configuration parameters: AllowModifier.
143
507
  Style/SoleNestedConditional:
144
508
  Exclude:
145
509
  - 'lib/gitlab/triage/validators/params_validator.rb'
510
+
511
+ # Offense count: 2
512
+ # This cop supports safe autocorrection (--autocorrect).
513
+ # Configuration parameters: EnforcedStyle, MinSize, WordRegex.
514
+ # SupportedStyles: percent, brackets
515
+ Style/WordArray:
516
+ Exclude:
517
+ - 'spec/gitlab/triage/filters/no_additional_labels_conditions_filter_spec.rb'
data/Gemfile CHANGED
@@ -2,15 +2,3 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in gitlab-rubocop.gemspec
4
4
  gemspec
5
-
6
- gem "yard"
7
-
8
- group :test do
9
- gem 'gitlab-styles', '~> 7.0'
10
- end
11
-
12
- group :development, :test, :danger do
13
- gem 'gitlab-dangerfiles', '~> 2.11.0', require: false
14
- gem 'guard-rspec', '~> 4.7.3', require: false
15
- gem 'lefthook', '~> 1.3', require: false
16
- end
@@ -39,9 +39,16 @@ Gem::Specification.new do |spec|
39
39
  spec.add_dependency 'graphql', '< 2.1.0'
40
40
  spec.add_dependency 'httparty', '~> 0.17'
41
41
 
42
- spec.add_development_dependency 'bundler'
43
- spec.add_development_dependency 'gitlab-styles', '~> 2.8'
42
+ spec.add_development_dependency 'gitlab-dangerfiles', '~> 2.11.0'
43
+ spec.add_development_dependency 'gitlab-styles', '~> 10.0'
44
+ spec.add_development_dependency 'guard-rspec', '~> 4.7.3'
45
+ spec.add_development_dependency 'lefthook', '~> 1.3'
44
46
  spec.add_development_dependency 'rake', '~> 10.2'
45
47
  spec.add_development_dependency 'rspec', '~> 3.8'
48
+ # we do not commit the bundle lockfile, so this temporary workaround needs to be
49
+ # present until 2.21.3 or 2.22.x is released
50
+ # See https://gitlab.com/gitlab-org/ruby/gems/gitlab-styles/-/issues/63
51
+ spec.add_development_dependency 'rubocop-rails', '!= 2.21.2'
46
52
  spec.add_development_dependency 'webmock', '~> 3.4'
53
+ spec.add_development_dependency 'yard'
47
54
  end
@@ -491,7 +491,7 @@ module Gitlab
491
491
  def sanitize_resources(resources)
492
492
  resources.each do |resource|
493
493
  # Titles should not contain newlines. Translate them to spaces.
494
- resource[:title]&.tr!("\r\n", ' ')
494
+ resource[:title] = resource[:title]&.tr("\r\n", ' ')
495
495
  end
496
496
  end
497
497
 
@@ -40,7 +40,7 @@ module Gitlab
40
40
  private
41
41
 
42
42
  def parse_response(response, resource_path)
43
- resource_path.reduce(response.data) { |data, resource| data&.send(resource) }
43
+ resource_path.reduce(response.data) { |data, resource| data&.send(resource) } # rubocop:disable GitlabSecurity/PublicSend
44
44
  end
45
45
 
46
46
  def raise_on_error!(response)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Gitlab
4
4
  module Triage
5
- VERSION = '1.42.1'
5
+ VERSION = '1.42.2'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab-triage
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.42.1
4
+ version: 1.42.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitLab
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-05 00:00:00.000000000 Z
11
+ date: 2023-10-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -87,33 +87,61 @@ dependencies:
87
87
  - !ruby/object:Gem::Version
88
88
  version: '0.17'
89
89
  - !ruby/object:Gem::Dependency
90
- name: bundler
90
+ name: gitlab-dangerfiles
91
91
  requirement: !ruby/object:Gem::Requirement
92
92
  requirements:
93
- - - ">="
93
+ - - "~>"
94
94
  - !ruby/object:Gem::Version
95
- version: '0'
95
+ version: 2.11.0
96
96
  type: :development
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
- - - ">="
100
+ - - "~>"
101
101
  - !ruby/object:Gem::Version
102
- version: '0'
102
+ version: 2.11.0
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: gitlab-styles
105
105
  requirement: !ruby/object:Gem::Requirement
106
106
  requirements:
107
107
  - - "~>"
108
108
  - !ruby/object:Gem::Version
109
- version: '2.8'
109
+ version: '10.0'
110
+ type: :development
111
+ prerelease: false
112
+ version_requirements: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - "~>"
115
+ - !ruby/object:Gem::Version
116
+ version: '10.0'
117
+ - !ruby/object:Gem::Dependency
118
+ name: guard-rspec
119
+ requirement: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - "~>"
122
+ - !ruby/object:Gem::Version
123
+ version: 4.7.3
124
+ type: :development
125
+ prerelease: false
126
+ version_requirements: !ruby/object:Gem::Requirement
127
+ requirements:
128
+ - - "~>"
129
+ - !ruby/object:Gem::Version
130
+ version: 4.7.3
131
+ - !ruby/object:Gem::Dependency
132
+ name: lefthook
133
+ requirement: !ruby/object:Gem::Requirement
134
+ requirements:
135
+ - - "~>"
136
+ - !ruby/object:Gem::Version
137
+ version: '1.3'
110
138
  type: :development
111
139
  prerelease: false
112
140
  version_requirements: !ruby/object:Gem::Requirement
113
141
  requirements:
114
142
  - - "~>"
115
143
  - !ruby/object:Gem::Version
116
- version: '2.8'
144
+ version: '1.3'
117
145
  - !ruby/object:Gem::Dependency
118
146
  name: rake
119
147
  requirement: !ruby/object:Gem::Requirement
@@ -142,6 +170,20 @@ dependencies:
142
170
  - - "~>"
143
171
  - !ruby/object:Gem::Version
144
172
  version: '3.8'
173
+ - !ruby/object:Gem::Dependency
174
+ name: rubocop-rails
175
+ requirement: !ruby/object:Gem::Requirement
176
+ requirements:
177
+ - - "!="
178
+ - !ruby/object:Gem::Version
179
+ version: 2.21.2
180
+ type: :development
181
+ prerelease: false
182
+ version_requirements: !ruby/object:Gem::Requirement
183
+ requirements:
184
+ - - "!="
185
+ - !ruby/object:Gem::Version
186
+ version: 2.21.2
145
187
  - !ruby/object:Gem::Dependency
146
188
  name: webmock
147
189
  requirement: !ruby/object:Gem::Requirement
@@ -156,6 +198,20 @@ dependencies:
156
198
  - - "~>"
157
199
  - !ruby/object:Gem::Version
158
200
  version: '3.4'
201
+ - !ruby/object:Gem::Dependency
202
+ name: yard
203
+ requirement: !ruby/object:Gem::Requirement
204
+ requirements:
205
+ - - ">="
206
+ - !ruby/object:Gem::Version
207
+ version: '0'
208
+ type: :development
209
+ prerelease: false
210
+ version_requirements: !ruby/object:Gem::Requirement
211
+ requirements:
212
+ - - ">="
213
+ - !ruby/object:Gem::Version
214
+ version: '0'
159
215
  description:
160
216
  email:
161
217
  - gitlab_rubygems@gitlab.com