gitlab-labkit 0.20.0 → 0.21.3

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: 2ffa08defed93e465326a1f5db11670aacc69f3ebf2382d25459e4a9db3834b0
4
- data.tar.gz: 81e98feb830a7247ecfb21b227d0b8f9bd632a1e7d3a90b95e4563d7a6ccfb6c
3
+ metadata.gz: 14048d91e2aa329e7917f040d355f7be56c2f489ebf127bfa20404a8f2f9be64
4
+ data.tar.gz: ad10bb2702dd57e5d14fccc95c22c42741ccbe61dda33ec84a9c8a53298cb356
5
5
  SHA512:
6
- metadata.gz: 8132d375526e57b7afa78b4edcc93268cfffbe9b3c1cf5db9de0f18e6f4c8ac22b934d7e2deed413caf13583e483a896584acd8e56fa1318a748fedf19cd98a0
7
- data.tar.gz: 1f18c8ab7c8bacf6f8549d741c8ed500eebbca0e3fc4a47bed3fc5d239fc19eac9316c43ddfefdc771eb58ef11adc52e1a358ef46502bf4de0c7a6bca2e08207
6
+ metadata.gz: b47d6fe2f2cf24ab41a0829c0c70908f1f6848d077ad0d09cb57b1df5ea73bc42d279127ad944054ae2a3a8443369d64514b69f90b24f87a05045e55305a03c3
7
+ data.tar.gz: 41f04b4d054735c701e80b242cba69aa79723a620abe059e0888b423be0d868e9ab792b8fce08451bc304b8eb84b684d67bb9bcfb67befefdc707188d492c433
data/.gitlab/CODEOWNERS CHANGED
@@ -1 +1 @@
1
- * @andrewn @ayufan @reprazent
1
+ * @andrewn @ayufan @reprazent @mkaeppler
data/.gitlab-ci.yml CHANGED
@@ -20,6 +20,7 @@ workflow:
20
20
  test:3.0:
21
21
  image: ruby:3.0
22
22
  <<: *test_definition
23
+ allow_failure: true # until we resolve grpc compatibility, see https://gitlab.com/gitlab-org/labkit-ruby/-/merge_requests/81
23
24
 
24
25
  test:2.7:
25
26
  image: ruby:2.7
@@ -35,6 +36,17 @@ static-analysis:
35
36
  script:
36
37
  - rake verify
37
38
 
39
+ danger-review:
40
+ image: ruby:3.0
41
+ stage: test
42
+ except:
43
+ - tags
44
+ - master
45
+ before_script:
46
+ - bundle install
47
+ script:
48
+ - bundle exec danger --fail-on-errors=true --verbose
49
+
38
50
  deploy:
39
51
  stage: deploy
40
52
  script:
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.7.2
1
+ 2.7.4
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,40 @@
1
+ ## Developer Certificate of Origin and License
2
+
3
+ By contributing to GitLab B.V., you accept and agree to the following terms and
4
+ conditions for your present and future contributions submitted to GitLab B.V.
5
+ Except for the license granted herein to GitLab B.V. and recipients of software
6
+ distributed by GitLab B.V., you reserve all right, title, and interest in and to
7
+ your Contributions.
8
+
9
+ All contributions are subject to the Developer Certificate of Origin and license set out at [docs.gitlab.com/ce/legal/developer_certificate_of_origin](https://docs.gitlab.com/ce/legal/developer_certificate_of_origin).
10
+
11
+ _This notice should stay as the first item in the CONTRIBUTING.md file._
12
+
13
+ ## Code of conduct
14
+
15
+ As contributors and maintainers of this project, we pledge to respect all people
16
+ who contribute through reporting issues, posting feature requests, updating
17
+ documentation, submitting pull requests or patches, and other activities.
18
+
19
+ We are committed to making participation in this project a harassment-free
20
+ experience for everyone, regardless of level of experience, gender, gender
21
+ identity and expression, sexual orientation, disability, personal appearance,
22
+ body size, race, ethnicity, age, or religion.
23
+
24
+ Examples of unacceptable behavior by participants include the use of sexual
25
+ language or imagery, derogatory comments or personal attacks, trolling, public
26
+ or private harassment, insults, or other unprofessional conduct.
27
+
28
+ Project maintainers have the right and responsibility to remove, edit, or reject
29
+ comments, commits, code, wiki edits, issues, and other contributions that are
30
+ not aligned to this Code of Conduct. Project maintainers who do not follow the
31
+ Code of Conduct may be removed from the project team.
32
+
33
+ This code of conduct applies both within project spaces and in public spaces
34
+ when an individual is representing the project or its community.
35
+
36
+ Instances of abusive, harassing, or otherwise unacceptable behavior can be
37
+ reported by emailing contact@gitlab.com.
38
+
39
+ This Code of Conduct is adapted from the [Contributor Covenant](https://contributor-covenant.org), version 1.1.0,
40
+ available at [https://contributor-covenant.org/version/1/1/0/](https://contributor-covenant.org/version/1/1/0/).
data/Dangerfile ADDED
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'gitlab-dangerfiles'
4
+
5
+ gitlab_dangerfiles = Gitlab::Dangerfiles::Engine.new(self)
6
+ gitlab_dangerfiles.import_plugins
7
+ gitlab_dangerfiles.import_dangerfiles
8
+
9
+ danger.import_plugin('danger/plugins/*.rb')
10
+
11
+ danger.import_dangerfile(path: File.join('danger', 'roulette'))
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Danger
4
+ # Common helper functions for danger scripts
5
+ class ProjectHelper < ::Danger::Plugin
6
+ def changes
7
+ # We do not need to categorize files in this code base
8
+ helper.changes([])
9
+ end
10
+
11
+ def project_name
12
+ "labkit-ruby"
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,62 @@
1
+ # frozen_string_literal: true
2
+
3
+ MESSAGE = <<MARKDOWN
4
+ ## Reviewer roulette
5
+
6
+ Changes that require review have been detected! A merge request is normally
7
+ reviewed by both a reviewer and a maintainer in its primary category and by a
8
+ maintainer in all other categories.
9
+ MARKDOWN
10
+
11
+ TABLE_MARKDOWN = <<MARKDOWN
12
+
13
+ To spread load more evenly across eligible reviewers, Danger has picked a candidate for each
14
+ review slot. Feel free to
15
+ [override these selections](https://about.gitlab.com/handbook/engineering/projects/#labkit-ruby)
16
+ if you think someone else would be better-suited
17
+ or request help in the `#labkit` Slack channel.
18
+
19
+ To read more on how to use the reviewer roulette, please take a look at the
20
+ [Engineering workflow](https://about.gitlab.com/handbook/engineering/workflow/#basics)
21
+ and [code review guidelines](https://docs.gitlab.com/ee/development/code_review.html).
22
+
23
+ Once you've decided who will review this merge request, mention them as you
24
+ normally would! Danger does not automatically notify them for you.
25
+
26
+ | Reviewer | Maintainer |
27
+ | -------- | ---------- |
28
+ MARKDOWN
29
+
30
+ def note_for_spins_role(spins, role)
31
+ spins.each do |spin|
32
+ note = note_for_spin_role(spin, role)
33
+
34
+ return note if note
35
+ end
36
+
37
+ 'No %{role} available' % { role: role }
38
+ end
39
+
40
+ def note_for_spin_role(spin, role)
41
+ spin.public_send(role)&.markdown_name(author: roulette.team_mr_author) # rubocop:disable GitlabSecurity/PublicSend
42
+ end
43
+
44
+ def markdown_row_for_spins(spins_array)
45
+ reviewer_note = note_for_spins_role(spins_array, :reviewer)
46
+ maintainer_note = note_for_spins_role(spins_array, :maintainer)
47
+
48
+ "#{reviewer_note} | #{maintainer_note} |"
49
+ end
50
+
51
+ if project_helper.changes.any?
52
+ project = project_helper.project_name
53
+
54
+ random_roulette_spins = roulette.spin(project, [nil], timezone_experiment: false)
55
+
56
+ rows = random_roulette_spins.map do |spin|
57
+ markdown_row_for_spins([spin])
58
+ end
59
+
60
+ markdown(MESSAGE)
61
+ markdown(TABLE_MARKDOWN + rows.join("\n")) unless rows.empty?
62
+ end
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
21
21
  # Please maintain alphabetical order for dependencies
22
22
  spec.add_runtime_dependency "actionpack", ">= 5.0.0", "< 7.0.0"
23
23
  spec.add_runtime_dependency "activesupport", ">= 5.0.0", "< 7.0.0"
24
- spec.add_runtime_dependency "grpc", "~> 1.19" # Be sure to update the "grpc-tools" dev_depenency too
24
+ spec.add_runtime_dependency "grpc", ">= 1.37" # Be sure to update the "grpc-tools" dev_dependency too
25
25
  spec.add_runtime_dependency "jaeger-client", "~> 1.1"
26
26
  spec.add_runtime_dependency "opentracing", "~> 0.4"
27
27
  spec.add_runtime_dependency "pg_query", "~> 2.1"
@@ -30,8 +30,9 @@ Gem::Specification.new do |spec|
30
30
  # Please maintain alphabetical order for dev dependencies
31
31
  spec.add_development_dependency "excon", "~> 0.78.1"
32
32
  spec.add_development_dependency "faraday", "~> 1.2.0"
33
+ spec.add_development_dependency "gitlab-dangerfiles"
33
34
  spec.add_development_dependency "gitlab-styles", "~> 6.2.0"
34
- spec.add_development_dependency "grpc-tools", "~> 1.19"
35
+ spec.add_development_dependency "grpc-tools", ">= 1.37"
35
36
  spec.add_development_dependency "httparty", "~> 0.17.3"
36
37
  spec.add_development_dependency "httpclient", "~> 2.8.3"
37
38
  spec.add_development_dependency "pry", "~> 0.12"
@@ -41,6 +42,6 @@ Gem::Specification.new do |spec|
41
42
  spec.add_development_dependency "rspec", "~> 3.10.0"
42
43
  spec.add_development_dependency "rspec-parameterized", "~> 0.4"
43
44
  spec.add_development_dependency "rufo", "0.9.0"
44
- spec.add_development_dependency "sidekiq", "~> 5.2.7"
45
+ spec.add_development_dependency "sidekiq", ">= 5.2"
45
46
  spec.add_development_dependency "webrick", "~> 1.7.0"
46
47
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab-labkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.20.0
4
+ version: 0.21.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Newdigate
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-09 00:00:00.000000000 Z
11
+ date: 2021-11-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack
@@ -54,16 +54,16 @@ dependencies:
54
54
  name: grpc
55
55
  requirement: !ruby/object:Gem::Requirement
56
56
  requirements:
57
- - - "~>"
57
+ - - ">="
58
58
  - !ruby/object:Gem::Version
59
- version: '1.19'
59
+ version: '1.37'
60
60
  type: :runtime
61
61
  prerelease: false
62
62
  version_requirements: !ruby/object:Gem::Requirement
63
63
  requirements:
64
- - - "~>"
64
+ - - ">="
65
65
  - !ruby/object:Gem::Version
66
- version: '1.19'
66
+ version: '1.37'
67
67
  - !ruby/object:Gem::Dependency
68
68
  name: jaeger-client
69
69
  requirement: !ruby/object:Gem::Requirement
@@ -154,6 +154,20 @@ dependencies:
154
154
  - - "~>"
155
155
  - !ruby/object:Gem::Version
156
156
  version: 1.2.0
157
+ - !ruby/object:Gem::Dependency
158
+ name: gitlab-dangerfiles
159
+ requirement: !ruby/object:Gem::Requirement
160
+ requirements:
161
+ - - ">="
162
+ - !ruby/object:Gem::Version
163
+ version: '0'
164
+ type: :development
165
+ prerelease: false
166
+ version_requirements: !ruby/object:Gem::Requirement
167
+ requirements:
168
+ - - ">="
169
+ - !ruby/object:Gem::Version
170
+ version: '0'
157
171
  - !ruby/object:Gem::Dependency
158
172
  name: gitlab-styles
159
173
  requirement: !ruby/object:Gem::Requirement
@@ -172,16 +186,16 @@ dependencies:
172
186
  name: grpc-tools
173
187
  requirement: !ruby/object:Gem::Requirement
174
188
  requirements:
175
- - - "~>"
189
+ - - ">="
176
190
  - !ruby/object:Gem::Version
177
- version: '1.19'
191
+ version: '1.37'
178
192
  type: :development
179
193
  prerelease: false
180
194
  version_requirements: !ruby/object:Gem::Requirement
181
195
  requirements:
182
- - - "~>"
196
+ - - ">="
183
197
  - !ruby/object:Gem::Version
184
- version: '1.19'
198
+ version: '1.37'
185
199
  - !ruby/object:Gem::Dependency
186
200
  name: httparty
187
201
  requirement: !ruby/object:Gem::Requirement
@@ -312,16 +326,16 @@ dependencies:
312
326
  name: sidekiq
313
327
  requirement: !ruby/object:Gem::Requirement
314
328
  requirements:
315
- - - "~>"
329
+ - - ">="
316
330
  - !ruby/object:Gem::Version
317
- version: 5.2.7
331
+ version: '5.2'
318
332
  type: :development
319
333
  prerelease: false
320
334
  version_requirements: !ruby/object:Gem::Requirement
321
335
  requirements:
322
- - - "~>"
336
+ - - ">="
323
337
  - !ruby/object:Gem::Version
324
- version: 5.2.7
338
+ version: '5.2'
325
339
  - !ruby/object:Gem::Dependency
326
340
  name: webrick
327
341
  requirement: !ruby/object:Gem::Requirement
@@ -351,10 +365,14 @@ files:
351
365
  - ".rubocop_todo.yml"
352
366
  - ".ruby-version"
353
367
  - ".rufo"
368
+ - CONTRIBUTING.md
369
+ - Dangerfile
354
370
  - Gemfile
355
371
  - LICENSE
356
372
  - README.md
357
373
  - Rakefile
374
+ - danger/plugins/project_helper.rb
375
+ - danger/roulette/Dangerfile
358
376
  - gitlab-labkit.gemspec
359
377
  - lib/gitlab-labkit.rb
360
378
  - lib/labkit/context.rb