gitlab-dangerfiles 2.7.1 → 2.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitlab/merge_request_templates/Release.md +9 -8
- data/.gitlab-ci.yml +3 -7
- data/gitlab-dangerfiles.gemspec +3 -3
- data/lib/danger/plugins/roulette.rb +10 -1
- data/lib/gitlab/dangerfiles/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0819c79b914e2025eecc3b05a52227a9012ceafeac3300032e1abb129706440
|
4
|
+
data.tar.gz: 117a9710932852cf1845d8a8c3a27f331bbe65da0cccdf13f044858d915ea0c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c93c2983a4a0ebba6f3c94d0b81a1da7ba9fad9eb98573a5862e3d6501ff76614501907bb5d492942a47472160d2db5d1a96fcebdad280379cd3e03a43c5f113
|
7
|
+
data.tar.gz: 734bbb0e6894d8de57f4d48546aca9f085447556662dbc64ba99f7cb39ea166b5a75f3d1099077e09d17f44d3687a9fe733451fa06310e02d906209b6003bcae
|
@@ -1,12 +1,13 @@
|
|
1
|
-
<!-- Replace `<
|
2
|
-
|
3
|
-
|
1
|
+
<!-- Replace `<PREVIOUS_VERSION>` with the previous version number here, `<COMMIT_UPDATING_VERSION>` with the latest
|
2
|
+
commit from this merge request, and `<NEW_VERSION>` with the upcoming version number. -->
|
3
|
+
## Diff
|
4
4
|
|
5
|
-
-
|
6
|
-
- [ ] Diff link is up-to-date.
|
7
|
-
- [ ] Based on the diff, `version.rb` is updated, according to [SemVer](https://semver.org).
|
5
|
+
https://gitlab.com/gitlab-org/ruby/gems/gitlab-dangerfiles/compare/v<PREVIOUS_VERSION>...<COMMIT_UPDATING_VERSION>
|
8
6
|
|
9
|
-
|
10
|
-
|
7
|
+
## Checklist
|
8
|
+
|
9
|
+
- [ ] Diff link is up-to-date.
|
10
|
+
- [ ] Check the release notes: https://gitlab.com/api/v4/projects/gitlab-org%2Fruby%2Fgems%2Fgitlab-dangerfiles/repository/changelog?version=<NEW_VERSION>
|
11
|
+
- [ ] Based on the diff and the release notes, `version.rb` is updated, according to [SemVer](https://semver.org).
|
11
12
|
|
12
13
|
/label ~"type::maintenance" ~"static code analysis"
|
data/.gitlab-ci.yml
CHANGED
@@ -28,12 +28,6 @@ workflow:
|
|
28
28
|
- Gemfile.lock
|
29
29
|
policy: pull
|
30
30
|
|
31
|
-
danger-review:
|
32
|
-
extends: .default
|
33
|
-
stage: test
|
34
|
-
script:
|
35
|
-
- bundle exec danger --fail-on-errors=true --verbose
|
36
|
-
|
37
31
|
test:rspec:
|
38
32
|
extends: .default
|
39
33
|
stage: test
|
@@ -52,7 +46,9 @@ include:
|
|
52
46
|
- template: Security/SAST.gitlab-ci.yml
|
53
47
|
- template: Security/Secret-Detection.gitlab-ci.yml
|
54
48
|
- project: 'gitlab-org/quality/pipeline-common'
|
55
|
-
file:
|
49
|
+
file:
|
50
|
+
- '/ci/danger-review.yml'
|
51
|
+
- '/ci/gem-release.yml'
|
56
52
|
|
57
53
|
# run security jobs on MRs
|
58
54
|
# see: https://gitlab.com/gitlab-org/gitlab/-/issues/218444#note_478761991
|
data/gitlab-dangerfiles.gemspec
CHANGED
@@ -8,15 +8,15 @@ Gem::Specification.new do |spec|
|
|
8
8
|
|
9
9
|
spec.summary = %q{This gem provides common Dangerfile and plugins for GitLab projects.}
|
10
10
|
spec.description = %q{This gem provides common Dangerfile and plugins for GitLab projects.}
|
11
|
-
spec.homepage = "https://gitlab.com/gitlab-org/gitlab-dangerfiles"
|
11
|
+
spec.homepage = "https://gitlab.com/gitlab-org/ruby/gems/gitlab-dangerfiles"
|
12
12
|
spec.license = "MIT"
|
13
13
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
|
14
14
|
|
15
15
|
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
16
16
|
|
17
17
|
spec.metadata["homepage_uri"] = spec.homepage
|
18
|
-
spec.metadata["source_code_uri"] = "https://gitlab.com/gitlab-org/gitlab-dangerfiles"
|
19
|
-
spec.metadata["changelog_uri"] = "https://gitlab.com/gitlab-org/gitlab-dangerfiles/-/releases"
|
18
|
+
spec.metadata["source_code_uri"] = "https://gitlab.com/gitlab-org/ruby/gems/gitlab-dangerfiles"
|
19
|
+
spec.metadata["changelog_uri"] = "https://gitlab.com/gitlab-org/ruby/gems/gitlab-dangerfiles/-/releases"
|
20
20
|
|
21
21
|
# Specify which files should be added to the gem when it is released.
|
22
22
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
@@ -22,7 +22,7 @@ module Danger
|
|
22
22
|
#
|
23
23
|
# @return [Gitlab::Dangerfiles::Teammate]
|
24
24
|
def team_mr_author
|
25
|
-
company_members.find { |person| person.username == helper.mr_author }
|
25
|
+
@team_mr_author ||= company_members.find { |person| person.username == helper.mr_author }
|
26
26
|
end
|
27
27
|
|
28
28
|
# Assigns GitLab team members to be reviewer and maintainer
|
@@ -36,6 +36,7 @@ module Danger
|
|
36
36
|
def spin(project = nil, categories = [nil], timezone_experiment: false)
|
37
37
|
project = (project || helper.config.project_name).downcase
|
38
38
|
categories = categories.map { |category| category&.downcase }
|
39
|
+
categories.reject! { |category| integrations_reject_category?(category, project) }
|
39
40
|
|
40
41
|
spins = categories.sort_by(&:to_s).map do |category|
|
41
42
|
including_timezone = INCLUDE_TIMEZONE_FOR_CATEGORY.fetch(category, timezone_experiment)
|
@@ -106,6 +107,14 @@ module Danger
|
|
106
107
|
person.username == helper.mr_author
|
107
108
|
end
|
108
109
|
|
110
|
+
# @param [String] category name
|
111
|
+
# @return [Boolean]
|
112
|
+
def integrations_reject_category?(category, project)
|
113
|
+
# Reject integrations categories if the MR author has reviewing abilities for the category.
|
114
|
+
team_mr_author&.integrations_be?(project, category, helper.mr_labels) ||
|
115
|
+
team_mr_author&.integrations_fe?(project, category, helper.mr_labels)
|
116
|
+
end
|
117
|
+
|
109
118
|
def new_random(seed)
|
110
119
|
Random.new(Digest::MD5.hexdigest(seed).to_i(16))
|
111
120
|
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: 2.
|
4
|
+
version: 2.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GitLab
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: danger-gitlab
|
@@ -170,14 +170,14 @@ files:
|
|
170
170
|
- lib/gitlab/dangerfiles/weightage.rb
|
171
171
|
- lib/gitlab/dangerfiles/weightage/maintainers.rb
|
172
172
|
- lib/gitlab/dangerfiles/weightage/reviewers.rb
|
173
|
-
homepage: https://gitlab.com/gitlab-org/gitlab-dangerfiles
|
173
|
+
homepage: https://gitlab.com/gitlab-org/ruby/gems/gitlab-dangerfiles
|
174
174
|
licenses:
|
175
175
|
- MIT
|
176
176
|
metadata:
|
177
177
|
allowed_push_host: https://rubygems.org
|
178
|
-
homepage_uri: https://gitlab.com/gitlab-org/gitlab-dangerfiles
|
179
|
-
source_code_uri: https://gitlab.com/gitlab-org/gitlab-dangerfiles
|
180
|
-
changelog_uri: https://gitlab.com/gitlab-org/gitlab-dangerfiles/-/releases
|
178
|
+
homepage_uri: https://gitlab.com/gitlab-org/ruby/gems/gitlab-dangerfiles
|
179
|
+
source_code_uri: https://gitlab.com/gitlab-org/ruby/gems/gitlab-dangerfiles
|
180
|
+
changelog_uri: https://gitlab.com/gitlab-org/ruby/gems/gitlab-dangerfiles/-/releases
|
181
181
|
post_install_message:
|
182
182
|
rdoc_options: []
|
183
183
|
require_paths:
|