Describe the bug
When adding a secret for organization with the gh secret set command, an error will occur if the name of the selected repository name contains '-'.
$ gh --version
gh version 1.5.0 (2021-01-21)
https://github.com/cli/cli/releases/tag/v1.5.0
Steps to reproduce the behavior
- Add repository(A) with a name that includes '-' to organization(B)
- Execute the following command:
gh secret set foo -bbar --org=B --repos=A
- See error
Expected vs actual behavior
Secret is added to the organization with visibility of the selected repository.
Logs
$ gh secret set foo -bbar --org=<org> --repos=<repo>
failed to set secret: failed to look up IDs for repositories [<repo>]: failed to look up repositories: GraphQL error: Parse error on "-" (error) at [2, 10]