You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
gh cli returns different (and incorrect) first entry than what is returned from the ui #9067
Unless I am misreading something, the UI on your screenshot is showing closed issues while the CLI query is for open issues.
Could you use the --state flag with closed? That should show closed issues, only. Other supported values are open and all
--state all is what i needed exactly ! as you said the ui is implicitly using closed while the cli is again implicitly using open without telling the user about what the query is implicitly using.
Do you think it would make sense to add a hint on the ui/cli to infomr the user what implicit settings are being passed ?
Do you think it would make sense to add a hint on the ui/cli to infomr the user what implicit settings are being passed ?
It's in issue list --help:
-s, --state string Filter by state: {open|closed|all} (default "open")
And if you run gh issue list the green is used to indicate state as well:
That said, I would be open to adding a little extra info in the issue list Long description. Do you think it would have helped you if issue list --help would have said:
List issues in a GitHub repository. By default this only lists open issues.
I'm not that keen to repeat information but I also don't want to ignore someone getting confused.
Activity
arunsathiya commentedon May 9, 2024
Unless I am misreading something, the UI on your screenshot is showing closed issues while the CLI query is for open issues.
Could you use the
--stateflag withclosed? That should show closed issues, only. Other supported values areopenandallyassinm commentedon May 10, 2024
--state allis what i needed exactly ! as you said the ui is implicitly using closed while the cli is again implicitly usingopenwithout telling the user about what the query is implicitly using.Do you think it would make sense to add a hint on the ui/cli to infomr the user what implicit settings are being passed ?
Bast Regards and thank you sooo much !!!
williammartin commentedon May 10, 2024
Thanks @arunsathiya for triaging this.
It's in
issue list --help:And if you run
gh issue listthe green is used to indicate state as well:That said, I would be open to adding a little extra info in the
issue listLong description. Do you think it would have helped you ifissue list --helpwould have said:I'm not that keen to repeat information but I also don't want to ignore someone getting confused.
yassinm commentedon May 10, 2024
@williammartin thank you so much for this detailed answer and your keen suggestion
what i missed is the
--stateflag that can be passed.gh issue list --helpshowing how to use statewilliammartin commentedon May 10, 2024
Great idea.
I've added the
help wantedlabel if you'd be up for contributing those changes.Cheers!
babakks commentedon May 29, 2024
@yassinm If you'd like to contribute these changes, you can edit the command description/examples here:
cli/pkg/cmd/issue/list/list.go
Lines 61 to 73 in faef2dd
babakks commentedon May 29, 2024
@williammartin If we're adding this, why not add a similar example to
gh pr list?williammartin commentedon May 30, 2024
Sounds like a nice idea to me!