gitlab-dangerfiles 3.13.0 → 4.0.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/.gitlab-ci.yml +0 -6
- data/.rubocop_todo.yml +0 -8
- data/README.md +1 -11
- data/gitlab-dangerfiles.gemspec +1 -1
- data/lib/danger/plugins/changelog.rb +1 -3
- data/lib/danger/rules/type_label/Dangerfile +0 -8
- data/lib/gitlab/dangerfiles/type_label_guesser.rb +2 -2
- data/lib/gitlab/dangerfiles/version.rb +1 -1
- data/lib/gitlab/dangerfiles.rb +0 -1
- metadata +4 -5
- data/lib/danger/rules/subtype_label/Dangerfile +0 -14
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c54d1dcf5be1bc4fb1b1f187ba1b203ddef74f661120b9efe9834ee05e95fee8
|
|
4
|
+
data.tar.gz: ac3617187d9bf2d523324b4320619fb361e30690ac2644e00e6a3edbaf78090c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c1b739e770be63ced18c8abd0a6f1be161bf62a98b86673fe88b95db79b589c57a0431174e43f4acf77e884e4bb8dc40272f17a6cb60282925062d1741f1d573
|
|
7
|
+
data.tar.gz: e6be44372b6881090c3e9a9d0099405315661c73a84a59ba7848b31f10ed4f72e3e861784fdfff47c985b192d26169ee96378d0d96487494c5d59ddd0e044d18
|
data/.gitlab-ci.yml
CHANGED
|
@@ -57,7 +57,6 @@ test:rufo:
|
|
|
57
57
|
|
|
58
58
|
include:
|
|
59
59
|
- template: Security/Dependency-Scanning.gitlab-ci.yml
|
|
60
|
-
- template: Security/License-Scanning.gitlab-ci.yml
|
|
61
60
|
- template: Security/SAST.gitlab-ci.yml
|
|
62
61
|
- template: Security/Secret-Detection.gitlab-ci.yml
|
|
63
62
|
- project: 'gitlab-org/quality/pipeline-common'
|
|
@@ -78,11 +77,6 @@ gemnasium-dependency_scanning:
|
|
|
78
77
|
- if: '$CI_MERGE_REQUEST_IID'
|
|
79
78
|
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
|
|
80
79
|
|
|
81
|
-
license_scanning:
|
|
82
|
-
rules:
|
|
83
|
-
- if: '$CI_MERGE_REQUEST_IID'
|
|
84
|
-
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
|
|
85
|
-
|
|
86
80
|
secret_detection:
|
|
87
81
|
rules:
|
|
88
82
|
- if: '$CI_MERGE_REQUEST_IID'
|
data/.rubocop_todo.yml
CHANGED
|
@@ -126,11 +126,6 @@ Lint/IdentityComparison:
|
|
|
126
126
|
- 'spec/gitlab/dangerfiles/weightage/maintainers_spec.rb'
|
|
127
127
|
- 'spec/gitlab/dangerfiles/weightage/reviewers_spec.rb'
|
|
128
128
|
|
|
129
|
-
# Offense count: 1
|
|
130
|
-
Lint/NonLocalExitFromIterator:
|
|
131
|
-
Exclude:
|
|
132
|
-
- 'lib/danger/rules/subtype_label/Dangerfile'
|
|
133
|
-
|
|
134
129
|
# Offense count: 1
|
|
135
130
|
# This cop supports safe autocorrection (--autocorrect).
|
|
136
131
|
Lint/RedundantCopDisableDirective:
|
|
@@ -310,7 +305,6 @@ Style/FrozenStringLiteralComment:
|
|
|
310
305
|
# Configuration parameters: MinBodyLength, AllowConsecutiveConditionals.
|
|
311
306
|
Style/GuardClause:
|
|
312
307
|
Exclude:
|
|
313
|
-
- 'lib/danger/rules/subtype_label/Dangerfile'
|
|
314
308
|
- 'lib/danger/rules/type_label/Dangerfile'
|
|
315
309
|
|
|
316
310
|
# Offense count: 2
|
|
@@ -384,7 +378,6 @@ Style/PercentLiteralDelimiters:
|
|
|
384
378
|
- 'Guardfile'
|
|
385
379
|
- 'gitlab-dangerfiles.gemspec'
|
|
386
380
|
- 'lib/danger/plugins/internal/helper.rb'
|
|
387
|
-
- 'lib/danger/rules/subtype_label/Dangerfile'
|
|
388
381
|
- 'lib/gitlab/dangerfiles/tasks/main.rake'
|
|
389
382
|
- 'spec/danger/plugins/internal/helper_spec.rb'
|
|
390
383
|
|
|
@@ -471,7 +464,6 @@ Style/SelectByRegexp:
|
|
|
471
464
|
# SupportedStyles: only_raise, only_fail, semantic
|
|
472
465
|
Style/SignalException:
|
|
473
466
|
Exclude:
|
|
474
|
-
- 'lib/danger/rules/subtype_label/Dangerfile'
|
|
475
467
|
- 'lib/danger/rules/type_label/Dangerfile'
|
|
476
468
|
|
|
477
469
|
# Offense count: 7
|
data/README.md
CHANGED
|
@@ -148,19 +148,9 @@ project. To use it in your project, perform the following steps:
|
|
|
148
148
|
end
|
|
149
149
|
```
|
|
150
150
|
|
|
151
|
-
#### `subtype_label`
|
|
152
|
-
|
|
153
|
-
This rule warns when the merge request is missing a [subtype label](https://about.gitlab.com/handbook/engineering/metrics/#work-type-classification).
|
|
154
|
-
|
|
155
|
-
If the `DANGER_ERROR_WHEN_SUBTYPE_LABEL_IS_MISSING` environment variable evaluates to `true`, Danger will error instead of warning when a subtype label is missing.
|
|
156
|
-
|
|
157
151
|
#### `type_label`
|
|
158
152
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
If the `DANGER_ERROR_WHEN_TYPE_LABEL_IS_MISSING` environment variable evaluates to `true`, Danger will error instead of warning when a type label is missing.
|
|
162
|
-
|
|
163
|
-
If the `changelog` plugin is available, it also tries to infer a type label from the `Changelog` trailer of the MR.
|
|
153
|
+
If the `changelog` plugin is available, it tries to infer a type label from the `Changelog` trailer of the MR.
|
|
164
154
|
|
|
165
155
|
#### `z_add_labels`
|
|
166
156
|
|
data/gitlab-dangerfiles.gemspec
CHANGED
|
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
|
|
|
29
29
|
|
|
30
30
|
spec.add_dependency "rake", ">= 0"
|
|
31
31
|
spec.add_dependency "danger-gitlab", ">= 8.0.0"
|
|
32
|
-
spec.add_dependency "danger", ">=
|
|
32
|
+
spec.add_dependency "danger", ">= 9.3.0"
|
|
33
33
|
|
|
34
34
|
spec.add_development_dependency "rspec", "~> 3.0"
|
|
35
35
|
spec.add_development_dependency "rspec-parameterized"
|
|
@@ -24,9 +24,7 @@ module Danger
|
|
|
24
24
|
OPTIONAL_CHANGELOG_MESSAGE = {
|
|
25
25
|
local: "If this merge request [doesn't need a CHANGELOG entry](https://docs.gitlab.com/ee/development/changelog.html#what-warrants-a-changelog-entry), feel free to ignore this message.",
|
|
26
26
|
ci: <<~MSG,
|
|
27
|
-
If
|
|
28
|
-
|
|
29
|
-
If you want to create a changelog entry for GitLab EE, also [add the `EE: true` trailer](https://docs.gitlab.com/ee/development/changelog.html#gitlab-enterprise-changes) to your commit message.
|
|
27
|
+
If this merge request needs a changelog entry, add the `Changelog` trailer to the commit message you want to add to the changelog.
|
|
30
28
|
|
|
31
29
|
If this merge request [doesn't need a CHANGELOG entry](https://docs.gitlab.com/ee/development/changelog.html#what-warrants-a-changelog-entry), feel free to ignore this message.
|
|
32
30
|
MSG
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
TYPE_LABEL_MISSING_MESSAGE = "Please add a [merge request type](https://about.gitlab.com/handbook/engineering/metrics/#work-type-classification) to this merge request."
|
|
4
|
-
|
|
5
3
|
require_relative "../../../gitlab/dangerfiles/type_label_guesser"
|
|
6
4
|
|
|
7
5
|
return if helper.has_scoped_label_with_scope?("type")
|
|
@@ -10,9 +8,3 @@ if respond_to?(:changelog)
|
|
|
10
8
|
type_label_guesser = Gitlab::Dangerfiles::TypeLabelGuesser.new
|
|
11
9
|
helper.labels_to_add.concat(type_label_guesser.labels_from_changelog_categories(changelog.categories))
|
|
12
10
|
end
|
|
13
|
-
|
|
14
|
-
if ENV['DANGER_ERROR_WHEN_TYPE_LABEL_IS_MISSING'] == 'true'
|
|
15
|
-
fail TYPE_LABEL_MISSING_MESSAGE
|
|
16
|
-
else
|
|
17
|
-
warn TYPE_LABEL_MISSING_MESSAGE
|
|
18
|
-
end
|
|
@@ -8,8 +8,8 @@ module Gitlab
|
|
|
8
8
|
security: %w[type::bug bug::vulnerability],
|
|
9
9
|
performance: %w[type::bug bug::performance],
|
|
10
10
|
added: %w[type::feature feature::addition],
|
|
11
|
-
deprecated: %w[type::
|
|
12
|
-
removed: %w[type::
|
|
11
|
+
deprecated: %w[type::maintenance maintenance::removal],
|
|
12
|
+
removed: %w[type::maintenance maintenance::removal],
|
|
13
13
|
}.freeze
|
|
14
14
|
|
|
15
15
|
def labels_from_changelog_categories(categories)
|
data/lib/gitlab/dangerfiles.rb
CHANGED
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
|
+
version: 4.0.0
|
|
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-09-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|
|
@@ -44,14 +44,14 @@ dependencies:
|
|
|
44
44
|
requirements:
|
|
45
45
|
- - ">="
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
|
-
version:
|
|
47
|
+
version: 9.3.0
|
|
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:
|
|
54
|
+
version: 9.3.0
|
|
55
55
|
- !ruby/object:Gem::Dependency
|
|
56
56
|
name: rspec
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -176,7 +176,6 @@ files:
|
|
|
176
176
|
- lib/danger/rules/commits_counter/Dangerfile
|
|
177
177
|
- lib/danger/rules/metadata/Dangerfile
|
|
178
178
|
- lib/danger/rules/simple_roulette/Dangerfile
|
|
179
|
-
- lib/danger/rules/subtype_label/Dangerfile
|
|
180
179
|
- lib/danger/rules/type_label/Dangerfile
|
|
181
180
|
- lib/danger/rules/z_add_labels/Dangerfile
|
|
182
181
|
- lib/danger/rules/z_retry_link/Dangerfile
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
SUBTYPE_LABEL_MISSING_MESSAGE = "Please add a [merge request subtype](https://about.gitlab.com/handbook/engineering/metrics/#work-type-classification) to this merge request."
|
|
4
|
-
|
|
5
|
-
types = %w(bug feature maintenance)
|
|
6
|
-
types.each do |type|
|
|
7
|
-
return if helper.has_scoped_label_with_scope?(type)
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
if ENV['DANGER_ERROR_WHEN_SUBTYPE_LABEL_IS_MISSING'] == 'true'
|
|
11
|
-
fail SUBTYPE_LABEL_MISSING_MESSAGE
|
|
12
|
-
else
|
|
13
|
-
warn SUBTYPE_LABEL_MISSING_MESSAGE
|
|
14
|
-
end
|