Repository navigation
Update gh help output - #815
Conversation
ampinsk
left a comment
There was a problem hiding this comment.
I'm so excited about this! ✨ Already looks so much cleaner. I left some more specific comments below, but to respond to some more general things:
I tried to address this with the line "most gh commands need to be run in a directory containing a GitHub repository." But maybe the user would benefit more if our commands have a better error when they are run in a directory without a repository.
I'm also still a little stumped on how to manage this! Maybe the error message is the way to go.
We differ on this point. The help output is very high-level so I don’t see it as the manual for the app. I go the web to read documentation and see example usage for commands like find and grep because I find it easier to read than text on the terminal. I see including this as a way to make web documentation discoverable to people who might benefit from it.
+1 on this! I think even though a lot of the content is the same, the website is just easier to navigate and discover things for a lot of people. I think we see a need for this since we get a decent amount of issues of people not knowing a flag was available, or that certain commands exist. We're not forcing people to use it and the help commands are all available for anyone who wants to learn that way.
| gh <command> [subcommand] [flags]`}, | ||
| {"CORE COMMANDS", strings.Join(coreCommands, "\n")}, | ||
| {"ADDITIONAL COMMANDS", strings.Join(additionalCommands, "\n")}, | ||
| {"FEEDBACK", ` |
There was a problem hiding this comment.
I like the idea of surfacing the feedback prominently, but it feels a little odd to put this in between the commands and flags. I don't mind it being at the bottom! Since everything is clearer now I think it'll still be easy to spot.
| {"ADDITIONAL COMMANDS", strings.Join(additionalCommands, "\n")}, | ||
| {"FEEDBACK", ` | ||
| Fill out our feedback form <https://forms.gle/umxd3h31c7aMQFKG7> | ||
| Open an issue using “gh issue create -R cli/cli`}, |
There was a problem hiding this comment.
| Open an issue using “gh issue create -R cli/cli`}, | |
| Open an issue using “gh issue create -R cli/cli”}, |
Looks like a typo!
Co-Authored-By: Amanda Pinsker <[email protected]>
Co-Authored-By: Amanda Pinsker <[email protected]>
Co-Authored-By: Amanda Pinsker <[email protected]>
|
(looks like the before image is not what we have now? or am i misreading?) |
vilmibm
left a comment
There was a problem hiding this comment.
nice! i think this is a good balance between automated/manual generation.
|
I'm going to merge this. @ampinsk, should we start looking at redoing the help pages for |
|
@probablycorey yes definitely! |
This is an update to the help documentation based on ideas from @ampinsk (https://github.slack.com/archives/CLU79NDAS/p1587488768040500).
Before
After
Technical issue
I was hoping I could do more with Cobra to make the help documentation more automatic. For example, if I could add metadata to commands then separating “core” and "additional" commands would be possible with
cmd.SetHelpTemplate. Unfortunately, without some extreme hacking to our commands I couldn't figure out a way to make that possible. But I don't think this is something to worry about because this code is still mostly generated via commands and now all the help documentation is in one place making it easier to edit in the futureResponses to comments
I tried to address this with the line "most gh commands need to be run in a directory containing a GitHub repository." But maybe the user would benefit more if our commands have a better error when they are run in a directory without a repository.
We differ on this point. The help output is very high-level so I don’t see it as the manual for the app. I go the web to read documentation and see example usage for commands like
findandgrepbecause I find it easier to read than text on the terminal. I see including this as a way to make web documentation discoverable to people who might benefit from it.Closes #711