Repository navigation
Command gh run list documentation missing information #8588
Description
Activity
- addedenhancementa request to improve CLIa request to improve CLIhelp wantedContributions welcomeContributions welcomeand removedbugSomething isn't workingSomething isn't workingneeds-triageneeds to be reviewedneeds to be reviewed
on Feb 21, 2024 Hey @SRNissen, sorry it's taken so long to get round to this issue after the Christmas break. Some team changes and a large backlog. Thanks for opening this. The help text for
run listis definitely pretty sparse. I've labelled thishelp wantedso our community can contribute. Cheers.When you say:
including output in error cases.
It hints that you might have run into an unexpected error, was there something specific that you ran into?
God yes
Chronologically it goes like:
- A devops consultant at our company was making changes to the pipeline and that included a scripted call using
ghto get the run number - Trying to reproduce it on my machine before sending it into prod, I got an error.
- It was unclear to me if I was getting an error because the consultant had made a mistake, or if it was because my distro's
ghwas behind the official one. - in particular:
gh run list --json numberprintedUnknown JSON field: "number".
And that's when I took a look at the docs.
My thinking was along the lines of
my distro's
ghis pretty far behind, if it does the field validation clientside and the "number" field is new, maybe that's why it doesn't work for me.Seeing the docs had no info on this at all, I opened the issue.
(I solved the problem by building from source. With a new
gh, the consultant's script ran just fine.)Reacted by William Martin- A devops consultant at our company was making changes to the pipeline and that included a scripted call using
Thanks for providing the extra context, it'll be useful to anyone that wants to open a PR.
Reacted by Søren Rune Nissen@williammartin I just pushed a PR for this.
I also checked a few other
listsubcommands, and they also need a list of available JSON fields in their docs. If you were okay with the changes in my PR, I can replicate the same for otherlists.Thank you, it's great to see this happen.
Reacted by Babak K. Shandiz
Describe the bug
Documentation does not outline what the command outputs
Steps to reproduce the behavior
Go to https://cli.github.com/manual/gh_run_list
Expected vs actual behavior
Expected to find: Information on what output the command gives, including output in error cases.
Actually found: None of that.