Open
Description
What article on docs.github.com is affected?
https://docs.github.com/en/rest/reference/actions#create-or-update-an-organization-secret
What part(s) of the article would you like to see updated?
Under the parameters section for PUT /orgs/{org}/actions/secrets/{secret_name} the selected_repository_ids parameter says the list should be an "array of strings". However, if you send the repository ID as a string value like the following payload:
{
"encrypted_value":"MyEncryptedString",
"key_id":"MyKeyId",
"visibility":"selected",
"selected_repository_ids":[
"12345"
]
}
The API returns a 422 error with the following content:
{
"message":"Invalid request.\n\nFor 'items', \"12345\" is not an integer.",
"documentation_url":"https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret"
}
If you instead send an array of integers, the API call succeeds.
Based on this information the following line should be changed in the documentation:
selected_repository_ids | array of strings integers