From 2f166344f4e201e72510261c3ef5778dbe97f068 Mon Sep 17 00:00:00 2001 From: Keegan Campbell Date: Fri, 29 Apr 2022 07:32:06 -0700 Subject: [PATCH] Revert forking change (#1137) --- github/data_source_github_repository.go | 6 ------ github/resource_github_repository.go | 7 ------- github/resource_github_repository_test.go | 5 ----- website/docs/d/repository.html.markdown | 2 -- 4 files changed, 20 deletions(-) diff --git a/github/data_source_github_repository.go b/github/data_source_github_repository.go index 4706ad4da4..67f1b22c19 100644 --- a/github/data_source_github_repository.go +++ b/github/data_source_github_repository.go @@ -79,11 +79,6 @@ func dataSourceGithubRepository() *schema.Resource { Type: schema.TypeBool, Computed: true, }, - "allow_forking": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, "default_branch": { Type: schema.TypeString, Computed: true, @@ -234,7 +229,6 @@ func dataSourceGithubRepositoryRead(d *schema.ResourceData, meta interface{}) er d.Set("allow_squash_merge", repo.GetAllowSquashMerge()) d.Set("allow_rebase_merge", repo.GetAllowRebaseMerge()) d.Set("allow_auto_merge", repo.GetAllowAutoMerge()) - d.Set("allow_forking", repo.GetAllowForking()) d.Set("has_downloads", repo.GetHasDownloads()) d.Set("full_name", repo.GetFullName()) d.Set("default_branch", repo.GetDefaultBranch()) diff --git a/github/resource_github_repository.go b/github/resource_github_repository.go index 11c191a2bd..38567d5d45 100644 --- a/github/resource_github_repository.go +++ b/github/resource_github_repository.go @@ -94,11 +94,6 @@ func resourceGithubRepository() *schema.Resource { Optional: true, Default: false, }, - "allow_forking": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, "delete_branch_on_merge": { Type: schema.TypeBool, Optional: true, @@ -300,7 +295,6 @@ func resourceGithubRepositoryObject(d *schema.ResourceData) *github.Repository { AllowSquashMerge: github.Bool(d.Get("allow_squash_merge").(bool)), AllowRebaseMerge: github.Bool(d.Get("allow_rebase_merge").(bool)), AllowAutoMerge: github.Bool(d.Get("allow_auto_merge").(bool)), - AllowForking: github.Bool(d.Get("allow_forking").(bool)), DeleteBranchOnMerge: github.Bool(d.Get("delete_branch_on_merge").(bool)), AutoInit: github.Bool(d.Get("auto_init").(bool)), LicenseTemplate: github.String(d.Get("license_template").(string)), @@ -446,7 +440,6 @@ func resourceGithubRepositoryRead(d *schema.ResourceData, meta interface{}) erro d.Set("allow_squash_merge", repo.GetAllowSquashMerge()) d.Set("allow_rebase_merge", repo.GetAllowRebaseMerge()) d.Set("allow_auto_merge", repo.GetAllowAutoMerge()) - d.Set("allow_forking", repo.GetAllowForking()) d.Set("delete_branch_on_merge", repo.GetDeleteBranchOnMerge()) d.Set("has_downloads", repo.GetHasDownloads()) d.Set("full_name", repo.GetFullName()) diff --git a/github/resource_github_repository_test.go b/github/resource_github_repository_test.go index b388a0580f..8814659406 100644 --- a/github/resource_github_repository_test.go +++ b/github/resource_github_repository_test.go @@ -31,7 +31,6 @@ func TestAccGithubRepositories(t *testing.T) { allow_squash_merge = false allow_rebase_merge = false allow_auto_merge = true - allow_forking = false auto_init = false } @@ -46,10 +45,6 @@ func TestAccGithubRepositories(t *testing.T) { "github_repository.test", "allow_auto_merge", "true", ), - resource.TestCheckResourceAttr( - "github_repository.test", "allow_forking", - "false", - ), ) testCase := func(t *testing.T, mode string) { diff --git a/website/docs/d/repository.html.markdown b/website/docs/d/repository.html.markdown index d3ef8905a6..59f934bffc 100644 --- a/website/docs/d/repository.html.markdown +++ b/website/docs/d/repository.html.markdown @@ -51,8 +51,6 @@ The following arguments are supported: * `allow_auto_merge` - Whether the repository allows auto-merging pull requests. -* `allow_forking` - Whether true to allow private forks, or false to prevent private forks. - * `has_downloads` - Whether the repository has Downloads feature enabled. * `default_branch` - The name of the default branch of the repository.