@@ -134,15 +134,10 @@ func resourceGithubActionsOrganizationWorkflowPermissionsCreateOrUpdate(ctx cont
134134 return handleEditWorkflowPermissionsError (ctx , err , resp )
135135 }
136136
137- tflog .Trace (ctx , "GitHub API call completed successfully" , map [string ]any {
138- "organization_slug" : organizationSlug ,
139- })
140-
141- // Calling read is necessary as the Update API returns 204 with Empty Body on success
142137 tflog .Trace (ctx , "Exiting Create/Update workflow permissions successfully" , map [string ]any {
143138 "organization_slug" : organizationSlug ,
144139 })
145- return resourceGithubActionsOrganizationWorkflowPermissionsRead ( ctx , d , meta )
140+ return nil
146141}
147142
148143func resourceGithubActionsOrganizationWorkflowPermissionsRead (ctx context.Context , d * schema.ResourceData , meta any ) diag.Diagnostics {
@@ -168,12 +163,6 @@ func resourceGithubActionsOrganizationWorkflowPermissionsRead(ctx context.Contex
168163 "can_approve_pull_request_reviews" : workflowPerms .CanApprovePullRequestReviews ,
169164 })
170165
171- tflog .Trace (ctx , "Setting state values" , map [string ]any {
172- "organization_slug" : organizationSlug ,
173- "default_workflow_permissions" : workflowPerms .DefaultWorkflowPermissions ,
174- "can_approve_pull_request_reviews" : workflowPerms .CanApprovePullRequestReviews ,
175- })
176-
177166 if err := d .Set ("organization_slug" , organizationSlug ); err != nil {
178167 return diag .FromErr (err )
179168 }
@@ -215,18 +204,15 @@ func resourceGithubActionsOrganizationWorkflowPermissionsDelete(ctx context.Cont
215204 })
216205
217206 tflog .Debug (ctx , "Calling GitHub API to reset workflow permissions" , map [string ]any {
218- "organization_slug" : organizationSlug ,
207+ "organization_slug" : organizationSlug ,
208+ "workflow_permissions" : workflowPerms ,
219209 })
220210
221211 _ , resp , err := client .Actions .UpdateDefaultWorkflowPermissionsInOrganization (ctx , organizationSlug , workflowPerms )
222212 if err != nil {
223213 return handleEditWorkflowPermissionsError (ctx , err , resp )
224214 }
225215
226- tflog .Trace (ctx , "GitHub API call completed successfully" , map [string ]any {
227- "organization_slug" : organizationSlug ,
228- })
229-
230216 tflog .Trace (ctx , "Exiting Delete workflow permissions successfully" , map [string ]any {
231217 "organization_slug" : organizationSlug ,
232218 })
0 commit comments