Add selected repository to an organization secret
PUT
/orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id} https://api.github.com
Adds a repository to an organization development environment secret when the visibility for repository access is set to selected. The visibility is set when you Create or update an organization secret.
OAuth app tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.
Parameters
path Path Parameters
| Name | Type |
|---|---|
org
required
The organization name. The name is not case sensitive. | string |
secret_name
required
The name of the secret. | string |
repository_id
required
| number |
Responses
204
No Content when repository was added to the selected list
unknown
Client Errors
404 application/json
Resource not found
interface BasicError {
message?: string;
documentation_url?: string;
url?: string;
status?: string;
}
message?: string;
documentation_url?: string;
url?: string;
status?: string;
}
409
Conflict when visibility type is not set to selected
unknown
422 application/json
Validation failed, or the endpoint has been spammed.
interface ValidationError {
message: string;
documentation_url: string;
errors?: {
resource?: string;
field?: string;
message?: string;
code: string;
index?: number;
value?: string[] | string | number | null;
}[];
}
message: string;
documentation_url: string;
errors?: {
resource?: string;
field?: string;
message?: string;
code: string;
index?: number;
value?: string[] | string | number | null;
}[];
}