@@ -29,6 +29,7 @@ import (
2929
3030 forgejoBoolValidator "terraform-provider-forgejo/internal/provider/boolvalidator"
3131 forgejoListValidator "terraform-provider-forgejo/internal/provider/listvalidator"
32+ forgejoSetValidator "terraform-provider-forgejo/internal/provider/setvalidator"
3233)
3334
3435// Ensure the implementation satisfies the expected interfaces.
@@ -131,7 +132,7 @@ func (r *branchProtectionResource) Schema(ctx context.Context, req resource.Sche
131132 setvalidator .AlsoRequires (path.Expressions {
132133 path .MatchRoot ("enable_push_whitelist" ),
133134 }... ),
134- forgejoListValidator .RequiresTrueIfConfigured (path.Expressions {
135+ forgejoSetValidator .RequiresTrueIfConfigured (path.Expressions {
135136 path .MatchRoot ("enable_push_whitelist" ),
136137 }... ),
137138 },
@@ -151,7 +152,7 @@ func (r *branchProtectionResource) Schema(ctx context.Context, req resource.Sche
151152 setvalidator .AlsoRequires (path.Expressions {
152153 path .MatchRoot ("enable_push_whitelist" ),
153154 }... ),
154- forgejoListValidator .RequiresTrueIfConfigured (path.Expressions {
155+ forgejoSetValidator .RequiresTrueIfConfigured (path.Expressions {
155156 path .MatchRoot ("enable_push_whitelist" ),
156157 }... ),
157158 },
@@ -235,7 +236,7 @@ func (r *branchProtectionResource) Schema(ctx context.Context, req resource.Sche
235236 setvalidator .AlsoRequires (path.Expressions {
236237 path .MatchRoot ("enable_merge_whitelist" ),
237238 }... ),
238- forgejoListValidator .RequiresTrueIfConfigured (path.Expressions {
239+ forgejoSetValidator .RequiresTrueIfConfigured (path.Expressions {
239240 path .MatchRoot ("enable_merge_whitelist" ),
240241 }... ),
241242 },
@@ -255,7 +256,7 @@ func (r *branchProtectionResource) Schema(ctx context.Context, req resource.Sche
255256 setvalidator .AlsoRequires (path.Expressions {
256257 path .MatchRoot ("enable_merge_whitelist" ),
257258 }... ),
258- forgejoListValidator .RequiresTrueIfConfigured (path.Expressions {
259+ forgejoSetValidator .RequiresTrueIfConfigured (path.Expressions {
259260 path .MatchRoot ("enable_merge_whitelist" ),
260261 }... ),
261262 },
@@ -281,7 +282,7 @@ func (r *branchProtectionResource) Schema(ctx context.Context, req resource.Sche
281282 setvalidator .AlsoRequires (path.Expressions {
282283 path .MatchRoot ("enable_approvals_whitelist" ),
283284 }... ),
284- forgejoListValidator .RequiresTrueIfConfigured (path.Expressions {
285+ forgejoSetValidator .RequiresTrueIfConfigured (path.Expressions {
285286 path .MatchRoot ("enable_approvals_whitelist" ),
286287 }... ),
287288 },
@@ -301,7 +302,7 @@ func (r *branchProtectionResource) Schema(ctx context.Context, req resource.Sche
301302 setvalidator .AlsoRequires (path.Expressions {
302303 path .MatchRoot ("enable_approvals_whitelist" ),
303304 }... ),
304- forgejoListValidator .RequiresTrueIfConfigured (path.Expressions {
305+ forgejoSetValidator .RequiresTrueIfConfigured (path.Expressions {
305306 path .MatchRoot ("enable_approvals_whitelist" ),
306307 }... ),
307308 },
0 commit comments