-
Notifications
You must be signed in to change notification settings - Fork 8k
Closed
Labels
enhancementa request to improve CLIa request to improve CLIgh-secretrelating to the gh secret commandrelating to the gh secret commandhelp wantedContributions welcomeContributions welcome
Description
Describe the bug
Creating an Organization Secret via github.com allows you to specify the "selected repositories" visibility setting, and initially specify zero repos (you can update the list later).
https://docs.github.com/en/rest/actions/secrets?apiVersion=2022-11-28#create-or-update-an-organization-secret confirms the selected_repository_ids parameter is optional / not required.
Whereas using gh secret set somesecret -b somevalue -o orgname -v selected will error out.
Steps to reproduce the behavior
- Create an Organization secret, specify Selected Repositories for Visbiility, but don't specify any repositories.
- Confirm the secret is created.
- Create a Personal Access Token with Organization Secret level permissions (read/write)
- Then try
gh secret set somesecret -b somevalue -o orgname -v selectedusing the Personal Access Token - error.
Expected vs actual behavior
Expected: secret gets created, with "selected" visibility and no repositories specified.
Actual:
> gh secret set somesecret -b somevalue -o orgname -v selected
`--repos` list required with `--visibility=selected`
Usage: gh secret set <secret-name> [flags]
...
Logs
N/A
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementa request to improve CLIa request to improve CLIgh-secretrelating to the gh secret commandrelating to the gh secret commandhelp wantedContributions welcomeContributions welcome