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
Undocumented behaviour of the -w
flag for gh run list
#9038
Comments
Thanks for reporting this issue! ❤ Let's dig into this a little bit and figure out what all can be done. 🙇 How does this code work?Let's dig into how Lines 90 to 122 in 4896546
I think the salient point in the block above is that Line 113 in 4896546
Switching gears to how cli/pkg/cmd/workflow/list/list.go Lines 89 to 97 in 4896546
What to do?
Absolutely makes sense, which I think is an easy Option 1. Thinking about how
@joshuajtward : what do you think? could you share your use case for retrieving and working with inactive workflows? |
Hi @andyfeller! Thanks for the reply, that all makes sense. One thing to add to your Option 1 -
This would mean this nuance of the CLI is documented without the need for code changes. Obviously if you prefer adding the In terms of our use cases, we have some pipeline observability tooling which fetches data using |
Just to be clear, I would like to do both: improve documentation and provide the same level of data for those who want it. 👍 Marking this as |
Describe the bug
The
-w
flag forgh run list
behaves differently depending on whether a workflow name or a workflow filename is passed to it. Specifically, if a workflow has been manually disabled then thegh run list -w
will only return values with the filename as input, and nothing is returned for the workflow name (assuming no duplicate workflow names...).Versions checked:
2.44.1
,2.48.0
Steps to reproduce the behavior
gh run list -w my-workflow-name
and observe that no runs are foundgh run list -w my-workflow-name.yml
and observe that previous runs are listed (potentially as expected?)Expected vs actual behavior
Given the nature of workflow naming I can see reasonable grounds for this being a desirable feature of the CLI, so the scope of this issue is just to get the behaviour included in the documentation. If it turns out to be undesirable behaviour then I am happy to raise that as another issue!
Logs
The text was updated successfully, but these errors were encountered: