PUT
/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}Add a repository to an organization secret
Adds a repository to an organization secret's selected repository list. Use this operation only when the secret's visibility is set to selected, and ensure the authenticated user has collaborator access to the repository. OAuth tokens and personal access tokens (classic) require the admin:org scope, plus repo for private repositories.
- RetriesRetries up to 2×, 500ms backoff, 30s timeout.
orgstringrequired
The organization name. The value is not case-sensitive.
secret_namestringrequired
The name of the organization secret to update.
repository_idintegerrequired
The numeric identifier of the repository to add to the secret's selected repository list.
204Returns no content when the repository is added to the organization secret's selected repository list.
409Returned when the organization secret's visibility is not set to `selected`.
Error handling
A 409 is returned when the organization secret's visibility is not set to selected. The authenticated user must have collaborator access to the repository, and OAuth tokens or personal access tokens (classic) must include admin:org; private repositories also require repo.