From ee37f40117a3ee65cbc514456204846277dc2299 Mon Sep 17 00:00:00 2001 From: Alec <30310787+alec-pinson@users.noreply.github.com> Date: Tue, 11 May 2021 12:15:06 +0100 Subject: [PATCH] fix issue that prevents 'internal' repositories being created in an Enterprised Managed User organisation (#781) Error: POST https://api.github.com/orgs/ORG1/repos: 422 Public repositories are not permitted for Enterprise Managed Organizations. [] --- github/resource_github_repository.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github/resource_github_repository.go b/github/resource_github_repository.go index b63a69cd44..e73a449628 100644 --- a/github/resource_github_repository.go +++ b/github/resource_github_repository.go @@ -303,7 +303,7 @@ func resourceGithubRepositoryCreate(d *schema.ResourceData, meta interface{}) er visibility, ok := d.Get("visibility").(string) if ok { - if visibility == "private" { + if visibility == "private" || visibility == "internal" { isPrivate = true } }