Skip to content

Commit

Permalink
chore: change branch protection flatten function to use GetAppID sdk …
Browse files Browse the repository at this point in the history
…method
  • Loading branch information
TheQueenIsDead committed Dec 11, 2022
1 parent 52166bc commit 490d880
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions github/resource_github_branch_protection_v3_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,7 @@ func flattenAndSetRequiredStatusChecks(d *schema.ResourceData, protection *githu
for _, chk := range rsc.Checks {
chkMap := make(map[string]interface{})
chkMap["context"] = chk.Context
chkMap["app_id"] = func() int {
if chk.AppID != nil {
return int(*chk.AppID)
}
return -1
}()
chkMap["app_id"] = chk.GetAppID()
checks = append(checks, chkMap)
}

Expand Down

0 comments on commit 490d880

Please sign in to comment.