@@ -6,10 +6,10 @@ import (
66 "errors"
77 "fmt"
88 "io"
9- "log"
109 "net/http"
1110
1211 "github.com/google/go-github/v81/github"
12+ "github.com/hashicorp/terraform-plugin-log/tflog"
1313 "github.com/hashicorp/terraform-plugin-sdk/v2/diag"
1414 "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
1515 "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
@@ -91,7 +91,11 @@ func resourceGithubActionsOrganizationWorkflowPermissionsCreateOrUpdate(ctx cont
9191 workflowPerms .CanApprovePullRequestReviews = github .Ptr (v .(bool ))
9292 }
9393
94- log .Printf ("[DEBUG] Updating workflow permissions for Organization: %s" , organizationSlug )
94+ tflog .Debug (ctx , "Updating workflow permissions for Organization" , map [string ]any {
95+ "organization_slug" : organizationSlug ,
96+ "default_workflow_permissions" : workflowPerms .DefaultWorkflowPermissions ,
97+ "can_approve_pull_request_reviews" : workflowPerms .CanApprovePullRequestReviews ,
98+ })
9599 _ , resp , err := client .Actions .UpdateDefaultWorkflowPermissionsInOrganization (ctx , organizationSlug , workflowPerms )
96100 if err != nil {
97101 return handleEditWorkflowPermissionsError (err , resp )
@@ -105,7 +109,9 @@ func resourceGithubActionsOrganizationWorkflowPermissionsRead(ctx context.Contex
105109 client := meta .(* Owner ).v3client
106110
107111 organizationSlug := d .Id ()
108- log .Printf ("[DEBUG] Reading workflow permissions for Organization: %s" , organizationSlug )
112+ tflog .Debug (ctx , "Reading workflow permissions for Organization" , map [string ]any {
113+ "organization_slug" : organizationSlug ,
114+ })
109115
110116 workflowPerms , _ , err := client .Actions .GetDefaultWorkflowPermissionsInOrganization (ctx , organizationSlug )
111117 if err != nil {
@@ -129,7 +135,9 @@ func resourceGithubActionsOrganizationWorkflowPermissionsDelete(ctx context.Cont
129135 client := meta .(* Owner ).v3client
130136
131137 organizationSlug := d .Id ()
132- log .Printf ("[DEBUG] Resetting workflow permissions to defaults for Organization: %s" , organizationSlug )
138+ tflog .Debug (ctx , "Resetting workflow permissions to defaults for Organization" , map [string ]any {
139+ "organization_slug" : organizationSlug ,
140+ })
133141
134142 // Reset to safe defaults
135143 workflowPerms := github.DefaultWorkflowPermissionOrganization {
0 commit comments