Commit 43b1ce8 1 parent f1960ad commit 43b1ce8 Copy full SHA for 43b1ce8
File tree 2 files changed +9
-2
lines changed
2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -471,6 +471,14 @@ The file patterns use the [`.gitignore` format](https://git-scm.com/docs/gitigno
471
471
merge_request.modified_files("*.go", "docs/")
472
472
` ` `
473
473
474
+ # ### `merge_request.has_label`
475
+
476
+ Returns wether any of the provided label exist on the Merge Request.
477
+
478
+ ` ` ` expr
479
+ merge_request.has_label("my-label-name")
480
+ ` ` `
481
+
474
482
# ### `duration`
475
483
476
484
Returns the [`time.Duration`](https://pkg.go.dev/time#Duration) value of the given string str.
Original file line number Diff line number Diff line change @@ -66,7 +66,6 @@ func main() {
66
66
67
67
func nest (props []* Property ) {
68
68
for _ , field := range props {
69
-
70
69
if field .IsCustomType {
71
70
for _ , nested := range PropMap [field .Type ].Attributes {
72
71
field .AddAttribute (& Property {
@@ -175,6 +174,7 @@ func mutateHook(b *modelgen.ModelBuild) *modelgen.ModelBuild {
175
174
fieldProperty := & Property {
176
175
Name : exprTags .Name ,
177
176
Optional : field .Omittable || strings .HasPrefix (fieldType , "*" ),
177
+ IsSlice : strings .HasPrefix (fieldType , "[]" ),
178
178
Description : field .Description ,
179
179
}
180
180
@@ -196,7 +196,6 @@ func mutateHook(b *modelgen.ModelBuild) *modelgen.ModelBuild {
196
196
}
197
197
198
198
fieldProperty .Type = strings .TrimPrefix (fieldType , "*" )
199
- fieldProperty .IsSlice = strings .HasPrefix (fieldType , "[]" ) || fieldType == "label"
200
199
201
200
modelProperty .AddAttribute (fieldProperty )
202
201
} // end expr tag is set
You can’t perform that action at this time.
0 commit comments