@@ -812,7 +812,9 @@ func resourceGitlabProjectCreate(ctx context.Context, d *schema.ResourceData, me
812
812
options .TagList = stringSetToStringSlice (v .(* schema.Set ))
813
813
}
814
814
815
- if v , ok := d .GetOk ("initialize_with_readme" ); ok {
815
+ // nolint:staticcheck // SA1019 ignore deprecated GetOkExists
816
+ // lintignore: XR001 // TODO: replace with alternative for GetOkExists
817
+ if v , ok := d .GetOkExists ("initialize_with_readme" ); ok {
816
818
options .InitializeWithReadme = gitlab .Bool (v .(bool ))
817
819
}
818
820
@@ -828,7 +830,9 @@ func resourceGitlabProjectCreate(ctx context.Context, d *schema.ResourceData, me
828
830
options .TemplateProjectID = gitlab .Int (v .(int ))
829
831
}
830
832
831
- if v , ok := d .GetOk ("use_custom_template" ); ok {
833
+ // nolint:staticcheck // SA1019 ignore deprecated GetOkExists
834
+ // lintignore: XR001 // TODO: replace with alternative for GetOkExists
835
+ if v , ok := d .GetOkExists ("use_custom_template" ); ok {
832
836
options .UseCustomTemplate = gitlab .Bool (v .(bool ))
833
837
}
834
838
@@ -844,7 +848,9 @@ func resourceGitlabProjectCreate(ctx context.Context, d *schema.ResourceData, me
844
848
options .CIConfigPath = gitlab .String (v .(string ))
845
849
}
846
850
847
- if v , ok := d .GetOk ("resolve_outdated_diff_discussions" ); ok {
851
+ // nolint:staticcheck // SA1019 ignore deprecated GetOkExists
852
+ // lintignore: XR001 // TODO: replace with alternative for GetOkExists
853
+ if v , ok := d .GetOkExists ("resolve_outdated_diff_discussions" ); ok {
848
854
options .ResolveOutdatedDiffDiscussions = gitlab .Bool (v .(bool ))
849
855
}
850
856
@@ -860,11 +866,15 @@ func resourceGitlabProjectCreate(ctx context.Context, d *schema.ResourceData, me
860
866
options .AutoDevopsDeployStrategy = gitlab .String (v .(string ))
861
867
}
862
868
863
- if v , ok := d .GetOk ("auto_devops_enabled" ); ok {
869
+ // nolint:staticcheck // SA1019 ignore deprecated GetOkExists
870
+ // lintignore: XR001 // TODO: replace with alternative for GetOkExists
871
+ if v , ok := d .GetOkExists ("auto_devops_enabled" ); ok {
864
872
options .AutoDevopsEnabled = gitlab .Bool (v .(bool ))
865
873
}
866
874
867
- if v , ok := d .GetOk ("autoclose_referenced_issues" ); ok {
875
+ // nolint:staticcheck // SA1019 ignore deprecated GetOkExists
876
+ // lintignore: XR001 // TODO: replace with alternative for GetOkExists
877
+ if v , ok := d .GetOkExists ("autoclose_referenced_issues" ); ok {
868
878
options .AutocloseReferencedIssues = gitlab .Bool (v .(bool ))
869
879
}
870
880
@@ -888,7 +898,9 @@ func resourceGitlabProjectCreate(ctx context.Context, d *schema.ResourceData, me
888
898
options .ContainerRegistryAccessLevel = stringToAccessControlValue (v .(string ))
889
899
}
890
900
891
- if v , ok := d .GetOk ("emails_disabled" ); ok {
901
+ // nolint:staticcheck // SA1019 ignore deprecated GetOkExists
902
+ // lintignore: XR001 // TODO: replace with alternative for GetOkExists
903
+ if v , ok := d .GetOkExists ("emails_disabled" ); ok {
892
904
options .EmailsDisabled = gitlab .Bool (v .(bool ))
893
905
}
894
906
@@ -912,7 +924,9 @@ func resourceGitlabProjectCreate(ctx context.Context, d *schema.ResourceData, me
912
924
options .OperationsAccessLevel = stringToAccessControlValue (v .(string ))
913
925
}
914
926
915
- if v , ok := d .GetOk ("public_builds" ); ok {
927
+ // nolint:staticcheck // SA1019 ignore deprecated GetOkExists
928
+ // lintignore: XR001 // TODO: replace with alternative for GetOkExists
929
+ if v , ok := d .GetOkExists ("public_builds" ); ok {
916
930
options .PublicBuilds = gitlab .Bool (v .(bool ))
917
931
}
918
932
@@ -1120,12 +1134,16 @@ func resourceGitlabProjectCreate(ctx context.Context, d *schema.ResourceData, me
1120
1134
1121
1135
var editProjectOptions gitlab.EditProjectOptions
1122
1136
1123
- if v , ok := d .GetOk ("mirror_overwrites_diverged_branches" ); ok {
1137
+ // nolint:staticcheck // SA1019 ignore deprecated GetOkExists
1138
+ // lintignore: XR001 // TODO: replace with alternative for GetOkExists
1139
+ if v , ok := d .GetOkExists ("mirror_overwrites_diverged_branches" ); ok {
1124
1140
editProjectOptions .MirrorOverwritesDivergedBranches = gitlab .Bool (v .(bool ))
1125
1141
editProjectOptions .ImportURL = gitlab .String (d .Get ("import_url" ).(string ))
1126
1142
}
1127
1143
1128
- if v , ok := d .GetOk ("only_mirror_protected_branches" ); ok {
1144
+ // nolint:staticcheck // SA1019 ignore deprecated GetOkExists
1145
+ // lintignore: XR001 // TODO: replace with alternative for GetOkExists
1146
+ if v , ok := d .GetOkExists ("only_mirror_protected_branches" ); ok {
1129
1147
editProjectOptions .OnlyMirrorProtectedBranches = gitlab .Bool (v .(bool ))
1130
1148
editProjectOptions .ImportURL = gitlab .String (d .Get ("import_url" ).(string ))
1131
1149
}
@@ -1138,11 +1156,15 @@ func resourceGitlabProjectCreate(ctx context.Context, d *schema.ResourceData, me
1138
1156
editProjectOptions .MergeRequestsTemplate = gitlab .String (v .(string ))
1139
1157
}
1140
1158
1141
- if v , ok := d .GetOk ("merge_pipelines_enabled" ); ok {
1159
+ // nolint:staticcheck // SA1019 ignore deprecated GetOkExists
1160
+ // lintignore: XR001 // TODO: replace with alternative for GetOkExists
1161
+ if v , ok := d .GetOkExists ("merge_pipelines_enabled" ); ok {
1142
1162
editProjectOptions .MergePipelinesEnabled = gitlab .Bool (v .(bool ))
1143
1163
}
1144
1164
1145
- if v , ok := d .GetOk ("merge_trains_enabled" ); ok {
1165
+ // nolint:staticcheck // SA1019 ignore deprecated GetOkExists
1166
+ // lintignore: XR001 // TODO: replace with alternative for GetOkExists
1167
+ if v , ok := d .GetOkExists ("merge_trains_enabled" ); ok {
1146
1168
editProjectOptions .MergeTrainsEnabled = gitlab .Bool (v .(bool ))
1147
1169
}
1148
1170
0 commit comments