@@ -187,11 +187,10 @@ label:
187
187
color: "$pink"
188
188
# From this script, returning a list of labels
189
189
script: >
190
- map(merge_request.diff_stats, { .path }) // Generate a list of all file paths that was changed in the Merge Request
191
- | filter({ hasPrefix(#, "pkg/service/") }) // Remove all paths that doesn't start with "pkg/service/"
192
- | map({ filepath_dir(#) }) // Remove the filename from the path "pkg/service/example/file.go" => "pkg/service/example"
193
- | map({ trimPrefix(#, "pkg/") }) // Remove the prefix "pkg/" from the path "pkg/service/example" => "service/example"
194
- | uniq() // Remove duplicate values from the output
190
+ merge_request.modified_files_list("pkg/service/") // Generate a list of all file paths that was changed in the Merge Request inside pkg/service/
191
+ | map({ filepath_dir(#) }) // Remove the filename from the path "pkg/service/example/file.go" => "pkg/service/example"
192
+ | map({ trimPrefix(#, "pkg/") }) // Remove the prefix "pkg/" from the path "pkg/service/example" => "service/example"
193
+ | uniq() // Remove duplicate values from the output
195
194
` ` `
196
195
197
196
# ## `label` (list)
@@ -301,11 +300,10 @@ label:
301
300
description: "Modified this service directory"
302
301
color: "$pink"
303
302
script: >
304
- map(merge_request.diff_stats, { .path }) // Generate a list of all file paths that was changed in the Merge Request
305
- | filter({ hasPrefix(#, "pkg/service/") }) // Remove all paths that doesn't start with "pkg/service/"
306
- | map({ filepath_dir(#) }) // Remove the filename from the path "pkg/service/example/file.go" => "pkg/service/example"
307
- | map({ trimPrefix(#, "pkg/") }) // Remove the prefix "pkg/" from the path "pkg/service/example" => "service/example"
308
- | uniq() // Remove duplicate values from the output
303
+ merge_request.modified_files_list("pkg/service/") // Generate a list of all file paths that was changed in the Merge Request inside pkg/service/
304
+ | map({ filepath_dir(#) }) // Remove the filename from the path "pkg/service/example/file.go" => "pkg/service/example"
305
+ | map({ trimPrefix(#, "pkg/") }) // Remove the prefix "pkg/" from the path "pkg/service/example" => "service/example"
306
+ | uniq() // Remove duplicate values from the output
309
307
` ` `
310
308
311
309
# ### `label.color` (required)
0 commit comments