PUT/orgs/{org}/agents/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 when the secret's visibility is set to selected; the authenticated user must have collaborator access to the repository. OAuth tokens and personal access tokens (classic) require the admin:org scope, and private repositories also require the repo scope.

3 parameters
orgstringrequired
The organization name. The name is not case-sensitive.
secret_namestringrequired
The name of the organization secret.
repository_idintegerrequired
The unique integer identifier of the repository to add to the secret's selected repository list.

2 status codes
204Returns no content after adding the repository to the secret's selected repository list.
409Returned when the secret's repository visibility is not set to `selected`.

Error handling

A 409 is returned when the secret's repository visibility is not set to selected. The org path parameter must identify the organization, secret_name must identify the secret, and repository_id must identify the repository; the authenticated user must have collaborator access, and OAuth tokens and personal access tokens (classic) require the admin:org scope, plus the repo scope for private repositories.