[BUG]: types for octokit.rest.repos.createInOrg does not accept "internal" as visibility, despite it being valid #383
Labels
Status: Up for grabs
Issues that are ready to be worked on by anyone
Type: Bug
Something isn't working as documented
What happened?
I upgraded Octokit to version v20 of the API (by upgrading @actions/github to 6.0.0). This removed the
internal
option forvisibility
when callingoctokit.rest.repos.createInOrg
.When trying to call this method with either of the remaining options
public
orprivate
and creating a repo within an organisation I get the errorYou need admin access to the organization before adding a repository to it.
.If I bypass type checking and forcibly set this option back to
internal
then it works. This leads me to believe that this is an issue with the generated types.d.ts (or rather the underlying OpenApi spec.)This is the workaround - notice the cast to
any
Versions
@actions/github: 6.0.0
@octokit/openapi-types: 19.0.2
typescript: 5.1.6
node: 20.7.0
npm: 10.1.0
Relevant log output
Code of Conduct
The text was updated successfully, but these errors were encountered: