diff --git a/github/resource_github_branch.go b/github/resource_github_branch.go index 4e885b76bf..1a5c4e8b82 100644 --- a/github/resource_github_branch.go +++ b/github/resource_github_branch.go @@ -191,7 +191,7 @@ func resourceGithubBranchImport(d *schema.ResourceData, meta interface{}) ([]*sc // resourceGithubBranchRead calls d.SetId("") if the branch does not exist if d.Id() == "" { - return nil, fmt.Errorf("repository %s does not have a branch named %s.", repoName, branchName) + return nil, fmt.Errorf("repository %s does not have a branch named %s", repoName, branchName) } return []*schema.ResourceData{d}, nil diff --git a/github/resource_github_branch_protection_v3_utils.go b/github/resource_github_branch_protection_v3_utils.go index b4488a63f0..440ccabfb9 100644 --- a/github/resource_github_branch_protection_v3_utils.go +++ b/github/resource_github_branch_protection_v3_utils.go @@ -283,7 +283,7 @@ func expandRequiredStatusChecks(d *schema.ResourceData) (*github.RequiredStatusC // If we have a valid app_id, include it in the RSC rscAppId, err := strconv.Atoi(cAppId) if err != nil { - return nil, fmt.Errorf("Could not parse %v as valid app_id", cAppId) + return nil, fmt.Errorf("could not parse %v as valid app_id", cAppId) } rscAppId64 := int64(rscAppId) rscCheck = &github.RequiredStatusCheck{Context: cContext, AppID: &rscAppId64} diff --git a/github/resource_github_repository_environment.go b/github/resource_github_repository_environment.go index 61208227a9..dc8ba87069 100644 --- a/github/resource_github_repository_environment.go +++ b/github/resource_github_repository_environment.go @@ -172,6 +172,8 @@ func resourceGithubRepositoryEnvironmentRead(d *schema.ResourceData, meta interf "custom_branch_policies": env.DeploymentBranchPolicy.CustomBranchPolicies, }, }) + } else { + d.Set("deployment_branch_policy", []interface{}{}) } return nil