@@ -735,20 +735,20 @@ func resourceGithubOrganizationRulesetImport(ctx context.Context, d *schema.Reso
735735 return []* schema.ResourceData {d }, nil
736736}
737737
738- func validateConditionsFieldForBranchAndTagTargets (ctx context.Context , d * schema.ResourceDiff , meta any ) error {
738+ func validateConditionsFieldForBranchAndTagTargets (ctx context.Context , d * schema.ResourceDiff , _ any ) error {
739739 target := d .Get ("target" ).(string )
740740 conditions := d .Get ("conditions" ).([]any )[0 ].(map [string ]any )
741741 tflog .Debug (ctx , "Validating conditions field for branch and tag targets" , map [string ]any {"target" : target , "conditions" : conditions })
742742 if conditions ["ref_name" ] == nil || len (conditions ["ref_name" ].([]any )) == 0 {
743743 return fmt .Errorf ("ref_name must be set for %s target" , target )
744744 }
745745 if (conditions ["repository_name" ] == nil || len (conditions ["repository_name" ].([]any )) == 0 ) && (conditions ["repository_id" ] == nil || len (conditions ["repository_id" ].([]any )) == 0 ) {
746- return fmt .Errorf ("Either repository_name or repository_id must be set for %s target" , target )
746+ return fmt .Errorf ("either repository_name or repository_id must be set for %s target" , target )
747747 }
748748 return nil
749749}
750750
751- func validateConditionsFieldForPushTarget (ctx context.Context , d * schema.ResourceDiff , meta any ) error {
751+ func validateConditionsFieldForPushTarget (ctx context.Context , d * schema.ResourceDiff , _ any ) error {
752752 target := d .Get ("target" ).(string )
753753 conditions := d .Get ("conditions" ).([]any )[0 ].(map [string ]any )
754754 tflog .Debug (ctx , "Validating conditions field for push target" , map [string ]any {"target" : target , "conditions" : conditions })
@@ -759,7 +759,7 @@ func validateConditionsFieldForPushTarget(ctx context.Context, d *schema.Resourc
759759 return nil
760760}
761761
762- func validateConditionsFieldForRepositoryTarget (ctx context.Context , d * schema.ResourceDiff , meta any ) error {
762+ func validateConditionsFieldForRepositoryTarget (ctx context.Context , d * schema.ResourceDiff , _ any ) error {
763763 target := d .Get ("target" ).(string )
764764 conditions := d .Get ("conditions" ).([]any )[0 ].(map [string ]any )
765765 tflog .Debug (ctx , "Validating conditions field for repository target" , map [string ]any {"target" : target , "conditions" : conditions })
@@ -778,7 +778,7 @@ func validateConditionsFieldBasedOnTarget(ctx context.Context, d *schema.Resourc
778778 tflog .Debug (ctx , "Validating conditions field based on target" , map [string ]any {"target" : target })
779779 conditionsRaw := d .Get ("conditions" ).([]any )
780780
781- if conditionsRaw == nil || len (conditionsRaw ) == 0 {
781+ if len (conditionsRaw ) == 0 {
782782 tflog .Debug (ctx , "An empty conditions block, skipping validation." , map [string ]any {"target" : target })
783783 return nil
784784 }
0 commit comments