Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't see a clear way to show all available options for gh repo create <name> -l <license> #8946

Open
devhindo opened this issue Apr 8, 2024 · 5 comments
Labels
enhancement a request to improve CLI gh-repo relating to the gh repo command needs-triage needs to be reviewed

Comments

@devhindo
Copy link

devhindo commented Apr 8, 2024

provide a list of available options for things like --gitignore or --license

example:
gh repo create --license -l

mit
etc.

gh repo create --gitignore -l

Go
Node

reason: I don't know whether it's Go or go and I don't find other way than trying until it works
also mit or MIT? what if I wanted to check if new licenses are getting added?
also idk if this is the best syntax for listing these options or not. knowing that it's not available on the docs

@devhindo devhindo added the enhancement a request to improve CLI label Apr 8, 2024
@cliAutomation cliAutomation added the needs-triage needs to be reviewed label Apr 8, 2024
@devhindo devhindo changed the title can't see a clear way to show all available options for `gh repo create <name> -l <license> can't see a clear way to show all available options for gh repo create <name> -l <license> Apr 8, 2024
@andyfeller
Copy link
Contributor

@devhindo : As these options are governed beyond gh by GitHub API endpoint in github/gitignore and choosealicense.com, I think its fair we should at least have the documentation point the user to refer to these sites for more information.

While this idea of a semi-flag for listing options is interesting, I don't think it is realistic with how most argument and flag parsing libraries work. Again, the GitHub CLI doesn't govern what is a valid value.

@andyfeller andyfeller added the gh-repo relating to the gh repo command label Apr 8, 2024
@devhindo
Copy link
Author

devhindo commented Apr 8, 2024

@andyfeller So, Can't we just provide a CLI option to make a GET request to these external APIs to list the available flag options? If not, We could provide these links in the docs under each flag to be more clear (as the docs were the first place I headed to when I couldn't enter a valid license and found nothing there). I also can't find the code for the mentioned documentation page where I can contribute and add the links you provided.

@babakks
Copy link
Contributor

babakks commented Apr 8, 2024

@devhindo You can find the documentation for gh repo create command here.

@devhindo
Copy link
Author

devhindo commented Apr 8, 2024

@babakks Okay so that's fetched directly in the docs website here?
@andyfeller A PR that enhances the description of the -g and -l flags to include where the options can be found would be appropriate?

@babakks
Copy link
Contributor

babakks commented Apr 8, 2024

@devhindo I think what you see in the CLI manual website you mentioned above is actually generated from the code (@andyfeller please correct if I'm wrong). So if you update the docs in the code, then both the the CLI manual website and the gh repo create --help output will be updated, in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement a request to improve CLI gh-repo relating to the gh repo command needs-triage needs to be reviewed
Projects
None yet
Development

No branches or pull requests

5 participants
@andyfeller @babakks @devhindo @cliAutomation and others