Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions github/resource_github_branch_protection.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ func resourceGithubBranchProtectionCreate(d *schema.ResourceData, meta interface
RequiresCodeOwnerReviews: githubv4.NewBoolean(githubv4.Boolean(data.RequiresCodeOwnerReviews)),
RequiresCommitSignatures: githubv4.NewBoolean(githubv4.Boolean(data.RequiresCommitSignatures)),
RequiresConversationResolution: githubv4.NewBoolean(githubv4.Boolean(data.RequiresConversationResolution)),
RequiresLinearHistory: githubv4.NewBoolean(githubv4.Boolean(data.RequiresLinearHistory)),
RequiresStatusChecks: githubv4.NewBoolean(githubv4.Boolean(data.RequiresStatusChecks)),
RequiresStrictStatusChecks: githubv4.NewBoolean(githubv4.Boolean(data.RequiresStrictStatusChecks)),
RestrictsPushes: githubv4.NewBoolean(githubv4.Boolean(data.RestrictsPushes)),
Expand Down Expand Up @@ -284,6 +285,7 @@ func resourceGithubBranchProtectionUpdate(d *schema.ResourceData, meta interface
RequiresCodeOwnerReviews: githubv4.NewBoolean(githubv4.Boolean(data.RequiresCodeOwnerReviews)),
RequiresCommitSignatures: githubv4.NewBoolean(githubv4.Boolean(data.RequiresCommitSignatures)),
RequiresConversationResolution: githubv4.NewBoolean(githubv4.Boolean(data.RequiresConversationResolution)),
RequiresLinearHistory: githubv4.NewBoolean(githubv4.Boolean(data.RequiresLinearHistory)),
RequiresStatusChecks: githubv4.NewBoolean(githubv4.Boolean(data.RequiresStatusChecks)),
RequiresStrictStatusChecks: githubv4.NewBoolean(githubv4.Boolean(data.RequiresStrictStatusChecks)),
RestrictsPushes: githubv4.NewBoolean(githubv4.Boolean(data.RestrictsPushes)),
Expand Down
3 changes: 3 additions & 0 deletions github/resource_github_branch_protection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ func TestAccGithubBranchProtection(t *testing.T) {
resource.TestCheckResourceAttr(
"github_branch_protection.test", "require_conversation_resolution", "true",
),
resource.TestCheckResourceAttr(
"github_branch_protection.test", "required_linear_history", "false",
),
resource.TestCheckResourceAttr(
"github_branch_protection.test", "required_status_checks.#", "0",
),
Expand Down