Skip to content

Commit 808de22

Browse files
committed
API renames: edit to update
1 parent bb3b6ed commit 808de22

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

github/resource_github_actions_repository_permissions.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"context"
55
"log"
66

7-
"github.com/google/go-github/v68/github"
7+
"github.com/google/go-github/v77/github"
88
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
99
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
1010
)
@@ -125,7 +125,7 @@ func resourceGithubActionsRepositoryPermissionsCreateOrUpdate(d *schema.Resource
125125
repoActionPermissions.AllowedActions = &allowedActions
126126
}
127127

128-
_, _, err := client.Repositories.EditActionsPermissions(ctx,
128+
_, _, err := client.Repositories.UpdateActionsPermissions(ctx,
129129
owner,
130130
repoName,
131131
repoActionPermissions,
@@ -229,7 +229,7 @@ func resourceGithubActionsRepositoryPermissionsDelete(d *schema.ResourceData, me
229229
Enabled: github.Bool(true),
230230
}
231231

232-
_, _, err := client.Repositories.EditActionsPermissions(ctx,
232+
_, _, err := client.Repositories.UpdateActionsPermissions(ctx,
233233
owner,
234234
repoName,
235235
repoActionPermissions,

github/resource_github_enterprise_actions_permissions.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"context"
55
"errors"
66

7-
"github.com/google/go-github/v68/github"
7+
"github.com/google/go-github/v77/github"
88
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
99
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
1010
)
@@ -149,7 +149,7 @@ func resourceGithubActionsEnterprisePermissionsCreateOrUpdate(d *schema.Resource
149149
allowedActions := d.Get("allowed_actions").(string)
150150
enabledOrganizations := d.Get("enabled_organizations").(string)
151151

152-
_, _, err := client.Actions.EditActionsPermissionsInEnterprise(ctx,
152+
_, _, err := client.Actions.UpdateActionsPermissionsInEnterprise(ctx,
153153
enterpriseId,
154154
github.ActionsPermissionsEnterprise{
155155
AllowedActions: &allowedActions,
@@ -164,7 +164,7 @@ func resourceGithubActionsEnterprisePermissionsCreateOrUpdate(d *schema.Resource
164164
if err != nil {
165165
return err
166166
}
167-
_, _, err = client.Actions.EditActionsAllowedInEnterprise(ctx,
167+
_, _, err = client.Actions.UpdateActionsAllowedInEnterprise(ctx,
168168
enterpriseId,
169169
*actionsAllowedData)
170170
if err != nil {
@@ -277,7 +277,7 @@ func resourceGithubActionsEnterprisePermissionsDelete(d *schema.ResourceData, me
277277
ctx := context.WithValue(context.Background(), ctxId, d.Id())
278278

279279
// This will nullify any allowedActions elements
280-
_, _, err := client.Actions.EditActionsPermissionsInEnterprise(ctx,
280+
_, _, err := client.Actions.UpdateActionsPermissionsInEnterprise(ctx,
281281
d.Get("enterprise_slug").(string),
282282
github.ActionsPermissionsEnterprise{
283283
AllowedActions: github.String("all"),

github/resource_github_enterprise_actions_workflow_permissions.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"context"
55
"log"
66

7-
"github.com/google/go-github/v68/github"
7+
"github.com/google/go-github/v77/github"
88
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
99
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
1010
)
@@ -62,7 +62,7 @@ func resourceGithubEnterpriseActionsWorkflowPermissionsCreateOrUpdate(d *schema.
6262
}
6363

6464
log.Printf("[DEBUG] Updating workflow permissions for enterprise: %s", enterpriseSlug)
65-
_, _, err := client.Actions.EditDefaultWorkflowPermissionsInEnterprise(ctx, enterpriseSlug, workflowPerms)
65+
_, _, err := client.Actions.UpdateDefaultWorkflowPermissionsInEnterprise(ctx, enterpriseSlug, workflowPerms)
6666
if err != nil {
6767
return err
6868
}
@@ -108,7 +108,7 @@ func resourceGithubEnterpriseActionsWorkflowPermissionsDelete(d *schema.Resource
108108
CanApprovePullRequestReviews: github.Bool(false),
109109
}
110110

111-
_, _, err := client.Actions.EditDefaultWorkflowPermissionsInEnterprise(ctx, enterpriseSlug, workflowPerms)
111+
_, _, err := client.Actions.UpdateDefaultWorkflowPermissionsInEnterprise(ctx, enterpriseSlug, workflowPerms)
112112
if err != nil {
113113
return err
114114
}

0 commit comments

Comments
 (0)