gitlab-dangerfiles 4.8.0 → 4.8.1
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/CODEOWNERS +1 -1
- data/Gemfile.lock +1 -1
- data/README.md +46 -0
- data/lib/danger/plugins/internal/helper.rb +2 -1
- data/lib/gitlab/dangerfiles/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b42206a72b735d7a0016622666b37571d85d541a758d5454fbca3260e359f1f2
|
4
|
+
data.tar.gz: ac570434fc3dee200d7656a557668454e2ceb5719c43d49b80c364688d3d0e13
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '030678a153058f6c0ab3fdb198d109ca43b8693f763a6259585b2864c7d688faec108dbbe93285226a7b926ab6f99423b6b57d703f83004b588df27917582d22'
|
7
|
+
data.tar.gz: 7a3398d6bc48bdbd28a43329c311088c211b6343e00200a782b0eef9503dae39befeaaa139710847d3a674e1032508b8c938ef889f7907d9739548919fa12c97
|
data/.gitlab/CODEOWNERS
CHANGED
@@ -1 +1 @@
|
|
1
|
-
* @gl-
|
1
|
+
* @gl-dx/eng-prod
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -69,6 +69,52 @@ end
|
|
69
69
|
|
70
70
|
Note that your custom plugins and rules (unless you exclude them with `except`) are automatically imported by the gem.
|
71
71
|
|
72
|
+
### Import and load order
|
73
|
+
|
74
|
+
Plugins are imported in alphabetical order. Gem plugins are loaded before
|
75
|
+
project-local plugins.
|
76
|
+
|
77
|
+
Gem and project-local rules are combined, filtered, and loaded in alphabetical order.
|
78
|
+
|
79
|
+
Because all rules are executed as soon as they are imported, you should move all
|
80
|
+
logic from your root `Dangerfile` to project-local rules in
|
81
|
+
`danger/*/Dangerfile`.
|
82
|
+
|
83
|
+
For example:
|
84
|
+
|
85
|
+
**Bad**
|
86
|
+
|
87
|
+
`Dangerfile`:
|
88
|
+
|
89
|
+
```ruby
|
90
|
+
Gitlab::Dangerfiles.for_project(self) do |dangerfiles|
|
91
|
+
dangerfiles.import_dangerfiles(only: %w[z_add_labels])
|
92
|
+
end
|
93
|
+
|
94
|
+
# Bad, because gem rule `z_add_labels` has already been executed with empty labels list.
|
95
|
+
helper.labels_to_add << 'important'
|
96
|
+
```
|
97
|
+
|
98
|
+
**Good**
|
99
|
+
|
100
|
+
`Dangerfile`:
|
101
|
+
|
102
|
+
```ruby
|
103
|
+
Gitlab::Dangerfiles.for_project(self) do |dangerfiles|
|
104
|
+
dangerfiles.import_dangerfiles(only: %w[z_add_labels])
|
105
|
+
end
|
106
|
+
```
|
107
|
+
|
108
|
+
`danger/labels/Dangerfile`:
|
109
|
+
|
110
|
+
```ruby
|
111
|
+
# Good. Execution order:
|
112
|
+
# * root `Dangerfile`
|
113
|
+
# * project-local `danger/my_labels/Dangerfile`
|
114
|
+
# * gem rule `danger/z_add_labels/Dangerfile`
|
115
|
+
helper.labels_to_add << 'important'
|
116
|
+
```
|
117
|
+
|
72
118
|
### Plugins
|
73
119
|
|
74
120
|
Danger plugins are located under `lib/danger/plugins`.
|
@@ -29,7 +29,8 @@ module Danger
|
|
29
29
|
import_integrate_fe: '~"group::import and integrate" (frontend)',
|
30
30
|
Authentication: '~"group::authentication"',
|
31
31
|
Authorization: '~"group::authorization"',
|
32
|
-
Compliance: '~"group::compliance"'
|
32
|
+
Compliance: '~"group::compliance"',
|
33
|
+
Verify: '~"devops::verify"'
|
33
34
|
}.freeze
|
34
35
|
# rubocop:enable Style/HashSyntax
|
35
36
|
|
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.8.
|
4
|
+
version: 4.8.1
|
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: 2025-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|