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

Command gh run list documentation missing information #8588

Closed
SRNissen opened this issue Jan 17, 2024 · 7 comments · Fixed by #8934
Closed

Command gh run list documentation missing information #8588

SRNissen opened this issue Jan 17, 2024 · 7 comments · Fixed by #8934
Labels
docs enhancement a request to improve CLI gh-run relating to the gh run command help wanted Contributions welcome

Comments

@SRNissen
Copy link

SRNissen commented Jan 17, 2024

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.

@SRNissen SRNissen added the bug Something isn't working label Jan 17, 2024
@cliAutomation cliAutomation added the needs-triage needs to be reviewed label Jan 17, 2024
@mxie mxie added docs gh-run relating to the gh run command labels Feb 9, 2024
@williammartin williammartin added enhancement a request to improve CLI help wanted Contributions welcome and removed bug Something isn't working needs-triage needs to be reviewed labels Feb 21, 2024
@williammartin
Copy link
Member

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 list is definitely pretty sparse. I've labelled this help wanted so our community can contribute. Cheers.

@williammartin
Copy link
Member

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?

@SRNissen
Copy link
Author

SRNissen commented Feb 21, 2024

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 gh to 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 gh was behind the official one.
  • in particular: gh run list --json number printed Unknown JSON field: "number".

And that's when I took a look at the docs.

My thinking was along the lines of

my distro's gh is 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.)

@williammartin
Copy link
Member

Thanks for providing the extra context, it'll be useful to anyone that wants to open a PR.

@babakks
Copy link
Contributor

babakks commented Apr 6, 2024

@williammartin I just pushed a PR for this.

I also checked a few other list subcommands, 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 other lists.

@SRNissen
Copy link
Author

SRNissen commented Apr 6, 2024

Thank you, it's great to see this happen.

@babakks
Copy link
Contributor

babakks commented May 9, 2024

@SRNissen In the next release, there'll be a JSON Fields section in the --help output which will list the available fields. Check out the latest captures in PR #8934.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs enhancement a request to improve CLI gh-run relating to the gh run command help wanted Contributions welcome
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants