Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix: include empty Checks array on v3 branch protection creation #1409

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions github/resource_github_branch_protection_v3_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,11 @@ func expandRequiredStatusChecks(d *schema.ResourceData) (*github.RequiredStatusC

contexts := expandNestedSet(m, "contexts")
rsc.Contexts = contexts

// Contexts parameter is deprecated and Checks can not be nil
// Bug: https://github.com/google/go-github/issues/2467
// RequiredStatusChecksRequest: https://github.com/google/go-github/blob/master/github/repos.go#L992
rsc.Checks = []*github.RequiredStatusCheck{}
}
return rsc, nil
}
Expand Down