Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs do not list internal as a visibility option for the POST /orgs/{org}/repos REST API endpoint #24990

Closed
1 task done
ataylorme opened this issue Apr 11, 2023 · 5 comments
Closed
1 task done
Labels
content This issue or pull request belongs to the Docs Content team enterprise Content relating to GitHub Enterprise rest Content related to rest - overview. waiting for review Issue/PR is waiting for a writer's review

Comments

@ataylorme
Copy link

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/rest/repos/repos?apiVersion=2022-11-28#create-an-organization-repository

What changes are you suggesting?

visibility is listed as private or public. internal should be included as GitHub organizations can have internal visibility set for repositories.

Additionally, calling the POST /orgs/{org}/repos REST API endpoint with visibility set as internal does work, making the documentation inaccurate.

Additional information

I am using TypeScript and the GitHub Octokit NodeJS SDK for a project, which is giving a TypeScript type error when trying to set the visibility to internal for the POST /orgs/{org}/repos REST API endpoint.

The incorrect type is generated and can be found in https://raw.githubusercontent.com/octokit/openapi-types.ts/v16.0.0/packages/openapi-types/types.d.ts at line 97636, where it is declared as visibility?: "public" | "private";

I believe the GitHub API needs to be updated, which will also update the generated documentation and TypeScript types.

@ataylorme ataylorme added the content This issue or pull request belongs to the Docs Content team label Apr 11, 2023
@welcome
Copy link

welcome bot commented Apr 11, 2023

Thanks for opening this issue. A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.

@github-actions github-actions bot added the triage Do not begin working on this issue until triaged by the team label Apr 11, 2023
@steveward steveward added rest Content related to rest - overview. waiting for review Issue/PR is waiting for a writer's review and removed triage Do not begin working on this issue until triaged by the team labels Apr 14, 2023
@steveward
Copy link
Member

steveward commented Apr 14, 2023

Thanks for the issue @ataylorme, I'll get this triaged!

@lecoursen lecoursen added the enterprise Content relating to GitHub Enterprise label Apr 17, 2023
@lecoursen
Copy link
Member

👋🏻 @ataylorme, internal repositories are only available in GitHub Enterprise Cloud and GitHub Enterprise Server. The corresponding versions of that article (GHEC, GHES) do list internal as an option. Let me know if you have any questions about that!

@ataylorme
Copy link
Author

Thanks for the reply @lecoursen. I’m using https://github.com/octokit/types.ts and internal is not a valid type for visibility on the create repo in org endpoint. I’m assuming the TypeScript type repo is generated. Any idea how to have it show the proper types for enterprise cloud?

@lecoursen
Copy link
Member

Hm, I'm not sure @ataylorme! I'd suggest opening an issue in https://github.com/octokit/openapi-types.ts about that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content This issue or pull request belongs to the Docs Content team enterprise Content relating to GitHub Enterprise rest Content related to rest - overview. waiting for review Issue/PR is waiting for a writer's review
Projects
None yet
Development

No branches or pull requests

4 participants
@steveward @ataylorme @lecoursen and others