Create Internal Repo from Template using REST API #32817
Replies: 5 comments
|
@jrwhite17 I see there is a body parameter for "vivibioity" for cerate a new repository but not one forr from template. If no other option in a single API call you could create private and immediately folow up with with a |
|
Floating this back to the top of the list (hopefully?) I'm having the same issue. I create a repository from a template using per Create a repository using a template. This takes no visibility setting. After that call I do a PATCH per Update a repository. This has a visibility setting which the documentation says can be only When I try to pass Is this really intentional or is it an oversight? As a large enterprise organization we have lots of good reasons for setting an internal visibility. |
|
ditto |
|
It would be great it this could be resolved. It means anyone enforcing policies to prevent the changing of visibility (usually to stop repos being made public by accident) - is then unable to create an internal repo from a template as they have to do it in two stages, create the repo as private and then change to internal - which is then blocked for most users. Why not allow visibility to be passed in this API rather than |
|
I am running into the same issue trying to use OpenTofu to generate repos from a template. Would love if you could pass the visibility in as internal for the API. |
Uh oh!
There was an error while loading. Please reload this page.
Hello,
I am currently using GitHub AE. I'm wanting to write some code that generates internal repositories from an internal template (within an organization).
I've been following this documentation:
https://docs.github.com/en/github-ae@latest/rest/repos/repos#create-a-repository-using-a-template
When I use this REST API call: https://HOST.ghe.com/api/v3/repos/ORG/REPONAME/generate
{"owner":"ORG","name":"NEWREPONAME","description":"This is your first repository","include_all_branches":false, "private": false}
I receive: "message": "Public repositories not permitted on GitHub AE."
I am not seeing anything in the above documentation that describes how to generate an internal repository from a template. Is there a specific flag I need to pass in the body of the REST API call? Any information would be appreciated. Thanks!
All reactions