Describe the feature or problem you’d like to solve
As a CLI user, I want to find (and eventually delete) outdated release drafts. To this end, I want to use gh release list to find ONLY drafts.
Currently, the gh release list includes a flag --exclude-drafts to exclude draft releases. I need to do the inverse of this: exclude non-drafts.
Proposed solution
Add a new flag to gh release list, named for example --only-drafts. Its effect should be to filter out any release where isDraft is false.
Its behaviour should be equivalent to the current --exclude-drafts, in that the filter is applied before --limit, but the filtering condition should be the opposite.
Additional context
While it is currently technically possible to achieve the same result through the use of gh release view and jq, that would require N+1 commands rather than just the one. The single-command filtering seems like a relatively basic use case to extend gh release list with, especially seeing that the equal but opposite functionality is already implemented.
Another potential workaround currently is to grep the output for Draft, but that seems hacky and unreliable.
Describe the feature or problem you’d like to solve
As a CLI user, I want to find (and eventually delete) outdated release drafts. To this end, I want to use
gh release listto find ONLY drafts.Currently, the
gh release listincludes a flag--exclude-draftsto exclude draft releases. I need to do the inverse of this: exclude non-drafts.Proposed solution
Add a new flag to
gh release list, named for example--only-drafts. Its effect should be to filter out any release whereisDraftisfalse.Its behaviour should be equivalent to the current
--exclude-drafts, in that the filter is applied before--limit, but the filtering condition should be the opposite.Additional context
While it is currently technically possible to achieve the same result through the use of
gh release viewandjq, that would require N+1 commands rather than just the one. The single-command filtering seems like a relatively basic use case to extendgh release listwith, especially seeing that the equal but opposite functionality is already implemented.Another potential workaround currently is to
grepthe output forDraft, but that seems hacky and unreliable.