Only administrators can create internal repositories from templates in organizations that restrict changing repository visibility #836
Labels
r/repository
Status: Stale
Used by stalebot to clean house
Type: Bug
Something isn't working as documented
Terraform Version
Terraform v1.0.1
on darwin_amd64
Affected Resource(s)
Terraform Configuration Files
Debug Output
Panic Output
N/A
Expected Behavior
Creating an internal repo from a template should create the repo as internal instead of creating it as private and later changing it to internal.
This will make it possible to use the provider without admin privileges when the organization restricts changing the visibility of a repo to admins.
Actual Behavior
Repo create uses the REST V3 /repos/{template_owner}/{template_repo}/generate API method which does not support a visibility field.
Steps to Reproduce
terraform apply
Important Factoids
The equivalent method in the GraphQL API supports setting visibility to internal.
Ref: cloneTemplateRepository mutation.
References
The text was updated successfully, but these errors were encountered: