PUT
/orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}Add a repository to an organization secret
Adds a repository to an organization development environment secret's selected repository list. Use this operation when the secret's visibility is set to selected; OAuth app tokens and personal access tokens (classic) require the admin:org scope.
- RetriesRetries up to 2×, 500ms backoff, 30s timeout.
orgstringrequired
The organization name; matching is not case sensitive.
secret_namestringrequired
The name of the organization development environment secret.
repository_idintegerrequired
The unique integer identifier of the repository to add to the secret's selected list.
204Returns no content when the repository is added to the secret's selected repository list.
404Returned when the organization, secret, or repository cannot be found.
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
409Returned when the secret's repository visibility is not set to `selected`.
422Returned when validation fails or the endpoint has been spammed.
messagestringrequired
documentation_urlstringrequired
errorsarray<object>optional
Error handling
A 404 is returned when the organization, secret, or repository cannot be found. A 409 is returned when the secret's repository visibility is not set to selected. A 422 is returned when validation fails or the endpoint has been spammed; provide valid org, secret_name, and repository_id values.