Closed
Description
Schema Inaccuracy
Repo environment secrets can not be listed in the API if the repo environment name has a slash in it.
Expected
I should be able to list all secrets in an environment no matter what the repo environment name is called.
Recreate the issue
Create a repo environment named a/b
and then this will show no secrets:
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer MY_TOKEN" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repositories/<REPO_ID>/environments/a/b/secrets
The same issue occurs if getting an individual secret with:
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer MY_TOKEN" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repositories/<REPO_ID>/environments/a/b/secrets/<SECRET_NAME>
Documentation link:
https://docs.github.com/en/rest/actions/secrets?apiVersion=2022-11-28#list-environment-secrets
https://docs.github.com/en/rest/actions/secrets?apiVersion=2022-11-28#get-an-environment-secret