@@ -154,27 +154,6 @@ func resourceGithubBranchProtectionCreate(d *schema.ResourceData, meta interface
154154 if err != nil {
155155 return err
156156 }
157-
158- var reviewIds , pushIds , bypassIds []string
159- reviewIds , err = getActorIds (data .ReviewDismissalActorIDs , meta )
160- if err != nil {
161- return err
162- }
163-
164- pushIds , err = getActorIds (data .PushActorIDs , meta )
165- if err != nil {
166- return err
167- }
168-
169- bypassIds , err = getActorIds (data .BypassPullRequestActorIDs , meta )
170- if err != nil {
171- return err
172- }
173-
174- data .PushActorIDs = pushIds
175- data .ReviewDismissalActorIDs = reviewIds
176- data .BypassPullRequestActorIDs = bypassIds
177-
178157 input := githubv4.CreateBranchProtectionRuleInput {
179158 AllowsDeletions : githubv4 .NewBoolean (githubv4 .Boolean (data .AllowsDeletions )),
180159 AllowsForcePushes : githubv4 .NewBoolean (githubv4 .Boolean (data .AllowsForcePushes )),
@@ -276,11 +255,7 @@ func resourceGithubBranchProtectionRead(d *schema.ResourceData, meta interface{}
276255 log .Printf ("[DEBUG] Problem setting '%s' in %s %s branch protection (%s)" , PROTECTION_REQUIRES_CONVERSATION_RESOLUTION , protection .Repository .Name , protection .Pattern , d .Id ())
277256 }
278257
279- approvingReviews , err := setApprovingReviews (protection , d , meta )
280- if err != nil {
281- return err
282- }
283-
258+ approvingReviews := setApprovingReviews (protection )
284259 err = d .Set (PROTECTION_REQUIRES_APPROVING_REVIEWS , approvingReviews )
285260 if err != nil {
286261 log .Printf ("[DEBUG] Problem setting '%s' in %s %s branch protection (%s)" , PROTECTION_REQUIRES_APPROVING_REVIEWS , protection .Repository .Name , protection .Pattern , d .Id ())
@@ -292,10 +267,7 @@ func resourceGithubBranchProtectionRead(d *schema.ResourceData, meta interface{}
292267 log .Printf ("[DEBUG] Problem setting '%s' in %s %s branch protection (%s)" , PROTECTION_REQUIRES_STATUS_CHECKS , protection .Repository .Name , protection .Pattern , d .Id ())
293268 }
294269
295- restrictsPushes , err := setPushes (protection , d , meta )
296- if err != nil {
297- return err
298- }
270+ restrictsPushes := setPushes (protection )
299271 err = d .Set (PROTECTION_RESTRICTS_PUSHES , restrictsPushes )
300272 if err != nil {
301273 log .Printf ("[DEBUG] Problem setting '%s' in %s %s branch protection (%s)" , PROTECTION_RESTRICTS_PUSHES , protection .Repository .Name , protection .Pattern , d .Id ())
@@ -316,27 +288,6 @@ func resourceGithubBranchProtectionUpdate(d *schema.ResourceData, meta interface
316288 if err != nil {
317289 return err
318290 }
319-
320- var reviewIds , pushIds , bypassIds []string
321- reviewIds , err = getActorIds (data .ReviewDismissalActorIDs , meta )
322- if err != nil {
323- return err
324- }
325-
326- pushIds , err = getActorIds (data .PushActorIDs , meta )
327- if err != nil {
328- return err
329- }
330-
331- bypassIds , err = getActorIds (data .BypassPullRequestActorIDs , meta )
332- if err != nil {
333- return err
334- }
335-
336- data .PushActorIDs = pushIds
337- data .ReviewDismissalActorIDs = reviewIds
338- data .BypassPullRequestActorIDs = bypassIds
339-
340291 input := githubv4.UpdateBranchProtectionRuleInput {
341292 BranchProtectionRuleID : d .Id (),
342293 AllowsDeletions : githubv4 .NewBoolean (githubv4 .Boolean (data .AllowsDeletions )),
0 commit comments