@@ -820,7 +820,9 @@ func resourceGitlabProjectCreate(ctx context.Context, d *schema.ResourceData, me
820
820
options .TagList = stringSetToStringSlice (v .(* schema.Set ))
821
821
}
822
822
823
- if v , ok := d .GetOk ("initialize_with_readme" ); ok {
823
+ // nolint:staticcheck // SA1019 ignore deprecated GetOkExists
824
+ // lintignore: XR001 // TODO: replace with alternative for GetOkExists
825
+ if v , ok := d .GetOkExists ("initialize_with_readme" ); ok {
824
826
options .InitializeWithReadme = gitlab .Bool (v .(bool ))
825
827
}
826
828
@@ -836,7 +838,9 @@ func resourceGitlabProjectCreate(ctx context.Context, d *schema.ResourceData, me
836
838
options .TemplateProjectID = gitlab .Int (v .(int ))
837
839
}
838
840
839
- if v , ok := d .GetOk ("use_custom_template" ); ok {
841
+ // nolint:staticcheck // SA1019 ignore deprecated GetOkExists
842
+ // lintignore: XR001 // TODO: replace with alternative for GetOkExists
843
+ if v , ok := d .GetOkExists ("use_custom_template" ); ok {
840
844
options .UseCustomTemplate = gitlab .Bool (v .(bool ))
841
845
}
842
846
@@ -852,7 +856,9 @@ func resourceGitlabProjectCreate(ctx context.Context, d *schema.ResourceData, me
852
856
options .CIConfigPath = gitlab .String (v .(string ))
853
857
}
854
858
855
- if v , ok := d .GetOk ("resolve_outdated_diff_discussions" ); ok {
859
+ // nolint:staticcheck // SA1019 ignore deprecated GetOkExists
860
+ // lintignore: XR001 // TODO: replace with alternative for GetOkExists
861
+ if v , ok := d .GetOkExists ("resolve_outdated_diff_discussions" ); ok {
856
862
options .ResolveOutdatedDiffDiscussions = gitlab .Bool (v .(bool ))
857
863
}
858
864
@@ -868,11 +874,15 @@ func resourceGitlabProjectCreate(ctx context.Context, d *schema.ResourceData, me
868
874
options .AutoDevopsDeployStrategy = gitlab .String (v .(string ))
869
875
}
870
876
871
- if v , ok := d .GetOk ("auto_devops_enabled" ); ok {
877
+ // nolint:staticcheck // SA1019 ignore deprecated GetOkExists
878
+ // lintignore: XR001 // TODO: replace with alternative for GetOkExists
879
+ if v , ok := d .GetOkExists ("auto_devops_enabled" ); ok {
872
880
options .AutoDevopsEnabled = gitlab .Bool (v .(bool ))
873
881
}
874
882
875
- if v , ok := d .GetOk ("autoclose_referenced_issues" ); ok {
883
+ // nolint:staticcheck // SA1019 ignore deprecated GetOkExists
884
+ // lintignore: XR001 // TODO: replace with alternative for GetOkExists
885
+ if v , ok := d .GetOkExists ("autoclose_referenced_issues" ); ok {
876
886
options .AutocloseReferencedIssues = gitlab .Bool (v .(bool ))
877
887
}
878
888
@@ -896,7 +906,9 @@ func resourceGitlabProjectCreate(ctx context.Context, d *schema.ResourceData, me
896
906
options .ContainerRegistryAccessLevel = stringToAccessControlValue (v .(string ))
897
907
}
898
908
899
- if v , ok := d .GetOk ("emails_disabled" ); ok {
909
+ // nolint:staticcheck // SA1019 ignore deprecated GetOkExists
910
+ // lintignore: XR001 // TODO: replace with alternative for GetOkExists
911
+ if v , ok := d .GetOkExists ("emails_disabled" ); ok {
900
912
options .EmailsDisabled = gitlab .Bool (v .(bool ))
901
913
}
902
914
@@ -920,7 +932,9 @@ func resourceGitlabProjectCreate(ctx context.Context, d *schema.ResourceData, me
920
932
options .OperationsAccessLevel = stringToAccessControlValue (v .(string ))
921
933
}
922
934
923
- if v , ok := d .GetOk ("public_builds" ); ok {
935
+ // nolint:staticcheck // SA1019 ignore deprecated GetOkExists
936
+ // lintignore: XR001 // TODO: replace with alternative for GetOkExists
937
+ if v , ok := d .GetOkExists ("public_builds" ); ok {
924
938
options .PublicBuilds = gitlab .Bool (v .(bool ))
925
939
}
926
940
@@ -1128,12 +1142,16 @@ func resourceGitlabProjectCreate(ctx context.Context, d *schema.ResourceData, me
1128
1142
1129
1143
var editProjectOptions gitlab.EditProjectOptions
1130
1144
1131
- if v , ok := d .GetOk ("mirror_overwrites_diverged_branches" ); ok {
1145
+ // nolint:staticcheck // SA1019 ignore deprecated GetOkExists
1146
+ // lintignore: XR001 // TODO: replace with alternative for GetOkExists
1147
+ if v , ok := d .GetOkExists ("mirror_overwrites_diverged_branches" ); ok {
1132
1148
editProjectOptions .MirrorOverwritesDivergedBranches = gitlab .Bool (v .(bool ))
1133
1149
editProjectOptions .ImportURL = gitlab .String (d .Get ("import_url" ).(string ))
1134
1150
}
1135
1151
1136
- if v , ok := d .GetOk ("only_mirror_protected_branches" ); ok {
1152
+ // nolint:staticcheck // SA1019 ignore deprecated GetOkExists
1153
+ // lintignore: XR001 // TODO: replace with alternative for GetOkExists
1154
+ if v , ok := d .GetOkExists ("only_mirror_protected_branches" ); ok {
1137
1155
editProjectOptions .OnlyMirrorProtectedBranches = gitlab .Bool (v .(bool ))
1138
1156
editProjectOptions .ImportURL = gitlab .String (d .Get ("import_url" ).(string ))
1139
1157
}
@@ -1146,11 +1164,15 @@ func resourceGitlabProjectCreate(ctx context.Context, d *schema.ResourceData, me
1146
1164
editProjectOptions .MergeRequestsTemplate = gitlab .String (v .(string ))
1147
1165
}
1148
1166
1149
- if v , ok := d .GetOk ("merge_pipelines_enabled" ); ok {
1167
+ // nolint:staticcheck // SA1019 ignore deprecated GetOkExists
1168
+ // lintignore: XR001 // TODO: replace with alternative for GetOkExists
1169
+ if v , ok := d .GetOkExists ("merge_pipelines_enabled" ); ok {
1150
1170
editProjectOptions .MergePipelinesEnabled = gitlab .Bool (v .(bool ))
1151
1171
}
1152
1172
1153
- if v , ok := d .GetOk ("merge_trains_enabled" ); ok {
1173
+ // nolint:staticcheck // SA1019 ignore deprecated GetOkExists
1174
+ // lintignore: XR001 // TODO: replace with alternative for GetOkExists
1175
+ if v , ok := d .GetOkExists ("merge_trains_enabled" ); ok {
1154
1176
editProjectOptions .MergeTrainsEnabled = gitlab .Bool (v .(bool ))
1155
1177
}
1156
1178
0 commit comments