Skip to content
Discussion options

You must be logged in to vote

To mark an enterprise repository as internal using the GitHub REST API, you can follow these steps:

  1. Authenticate with GitHub using an access token that has the necessary permissions to modify the repository. You should include the access token in an Authorization header when making requests to the API.
  2. Make a PATCH request to the following endpoint, replacing ENTERPRISE_NAME with the name of your enterprise, REPO_OWNER with the owner of the repository, and REPO_NAME with the name of the repository: PATCH https://api.github.com/repos/ENTERPRISE_NAME/REPO_OWNER/REPO_NAME
  3. In the request body, include a JSON object with the following key-value pair: { "visibility": "internal" }
  4. Send the PATC…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@calebAtIspot
Comment options

Answer selected by ossanna16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API and Webhooks Discussions related to GitHub's APIs or Webhooks Enterprise Discussions related to GitHub Enterprise Cloud, Enterprise Server and Organizations Question Ask and answer questions about GitHub features and usage Enterprise Admin Topics specifically related to GitHub Enterprise administration
3 participants