gitlab-dangerfiles 2.10.0 → 2.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.txt +1 -1
- data/README.md +11 -1
- data/gitlab-dangerfiles.gemspec +1 -1
- data/lib/danger/plugins/changelog.rb +2 -3
- data/lib/danger/plugins/internal/helper.rb +5 -5
- data/lib/danger/rules/type_label/Dangerfile +1 -1
- data/lib/gitlab/dangerfiles/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 708f86af0c7d76e5df58d4ea85223461f39f1f7fb4248b3236d7baa92b626ccf
|
4
|
+
data.tar.gz: 22f2ee0d777dbc7ab95956f5bf2191c03449bc170baf9c9bacbd1e1e4a32ed69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad25c4c671fcde850a9c1740fb4e8dc847e4593cff3a55b4ef502bcb902cf84d5ddb4c7a0e64063371d252624f506b47047d32d292efa6ebee92f6db948162c5
|
7
|
+
data.tar.gz: '066975079aae0a2307c5b2a5734f4ff43d6556bd149c4dcdcac3586646e416c2abc1234ff3833359f24b4e5f19a1eece8af66c7c32b5b813df79cc5fb93bfbe6'
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -131,7 +131,17 @@ project. To use it in your project, perform the following steps:
|
|
131
131
|
|
132
132
|
#### `type_label`
|
133
133
|
|
134
|
-
This rule ensures the merge request has a proper [type label](https://about.gitlab.com/handbook/engineering/metrics/#work-type-classification) set
|
134
|
+
This rule ensures the merge request has a proper [type label](https://about.gitlab.com/handbook/engineering/metrics/#work-type-classification) set.
|
135
|
+
|
136
|
+
If the `changelog` plugin is available, it also tries to infer a type label from the `Changelog` trailer of the MR.
|
137
|
+
|
138
|
+
#### `z_add_labels`
|
139
|
+
|
140
|
+
This rule adds labels set from other rules (via `helper.labels_to_add`), with a single API request.
|
141
|
+
|
142
|
+
#### `z_retry_link`
|
143
|
+
|
144
|
+
This rule adds a retry link to the job where Danger ran at the end of the Danger message, only if there's any other message to post.
|
135
145
|
|
136
146
|
### CI configuration
|
137
147
|
|
data/gitlab-dangerfiles.gemspec
CHANGED
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
|
|
28
28
|
spec.require_paths = ["lib"]
|
29
29
|
|
30
30
|
spec.add_dependency "danger-gitlab", ">= 8.0.0"
|
31
|
-
spec.add_dependency "danger", ">= 8.
|
31
|
+
spec.add_dependency "danger", ">= 8.4.5"
|
32
32
|
|
33
33
|
spec.add_development_dependency "rspec", "~> 3.0"
|
34
34
|
spec.add_development_dependency "rspec-parameterized"
|
@@ -4,9 +4,8 @@ module Danger
|
|
4
4
|
# Contains method to check the presense and validity of changelogs.
|
5
5
|
class Changelog < Danger::Plugin
|
6
6
|
NO_CHANGELOG_LABELS = [
|
7
|
-
"
|
8
|
-
"
|
9
|
-
"tooling::workflow",
|
7
|
+
"maintenance::pipelines",
|
8
|
+
"maintenance::workflow",
|
10
9
|
"ci-build",
|
11
10
|
"meta",
|
12
11
|
].freeze
|
@@ -20,7 +20,7 @@ module Danger
|
|
20
20
|
test: "~test ~Quality for `spec/features/*`",
|
21
21
|
# Deprecated as of 2.3.0 in favor of tooling
|
22
22
|
engineering_productivity: '~"Engineering Productivity" for CI, Danger',
|
23
|
-
tooling: '~"
|
23
|
+
tooling: '~"maintenance::workflow" / ~"maintenance::pipelines" for CI, Danger',
|
24
24
|
ci_template: '~"ci::templates"',
|
25
25
|
product_intelligence: '~"product intelligence"',
|
26
26
|
integrations_be: '~"group::integrations" (backend)',
|
@@ -120,7 +120,7 @@ module Danger
|
|
120
120
|
# +modified_files+ might contain paths that already have been renamed,
|
121
121
|
# so we need to remove them from the list.
|
122
122
|
def all_changed_files
|
123
|
-
changes.files - changes.renamed_before.files
|
123
|
+
changes.files - changes.deleted.files - changes.renamed_before.files
|
124
124
|
end
|
125
125
|
|
126
126
|
# @param filename [String] A file name for which we want the diff.
|
@@ -282,7 +282,7 @@ module Danger
|
|
282
282
|
def mr_labels
|
283
283
|
return [] unless ci?
|
284
284
|
|
285
|
-
(gitlab_helper.mr_labels + labels_to_add
|
285
|
+
(gitlab_helper.mr_labels + labels_to_add).uniq
|
286
286
|
end
|
287
287
|
|
288
288
|
# @return [String] +`git rev-parse --abbrev-ref HEAD`+ when not in the CI context, and the MR source branch otherwise.
|
@@ -409,9 +409,9 @@ module Danger
|
|
409
409
|
# itself. Without this method, the first rule wouldn't know that the label would be applied and would ask
|
410
410
|
# for it anyway.
|
411
411
|
#
|
412
|
-
# @return [
|
412
|
+
# @return [Array<String>] the list of labels that Danger will add
|
413
413
|
def labels_to_add
|
414
|
-
@labels_to_add ||=
|
414
|
+
@labels_to_add ||= []
|
415
415
|
end
|
416
416
|
|
417
417
|
private
|
@@ -4,7 +4,7 @@ require_relative "../../../gitlab/dangerfiles/type_label_guesser"
|
|
4
4
|
|
5
5
|
if respond_to?(:changelog) && !helper.has_scoped_label_with_scope?("type")
|
6
6
|
type_label_guesser = Gitlab::Dangerfiles::TypeLabelGuesser.new
|
7
|
-
helper.labels_to_add.
|
7
|
+
helper.labels_to_add.concat(type_label_guesser.labels_from_changelog_categories(changelog.categories))
|
8
8
|
end
|
9
9
|
|
10
10
|
unless helper.has_scoped_label_with_scope?("type")
|
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.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GitLab
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-03-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: danger-gitlab
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 8.
|
33
|
+
version: 8.4.5
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 8.
|
40
|
+
version: 8.4.5
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|