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
One reason they might want to limit results is to filter the list, much like you can filter issues or PRs. Like heaths/gh-label we could either tag an optional argument for the filter term, or a --search parameter like issue list has for consistency. The former would only be breaking if someone actually expected an error with an additional arg, but that seems like an impractical test. The latter would be consistent with issue list and pr list, however.
Sort results by default. A large list of unsorted labels is difficult to read and find what you want. The order returned is also not documented and should not be relied on.
On a related note, should at least a label remove command as well. A label edit might also be useful, but a label create --force will accomplish the same thing.
I responded inline regarding these proposals, so I will just briefly summarize here.
I am not convinced that removing the default limit is the right direction for a couple reasons.
I am onboard with adding --order and --search flags with functionality that is backed by the API. Adding this functionality makes the default limit more valuable IMO.
The labels are ordered by created at date when returned from the API.
A label remove command makes sense to me but label edit seems redundant with label create --force. Perhaps that is okay though since label edit is more discoverable and explicit.
@samcoe I've got this nearly finished, but found a bug with the LabelConnection GraphQL type: if you specify a query, the orderBy has no effect. I can work around this, but would be great to see a fix for GraphQL.
Activity
heaths commentedon Apr 20, 2022
On a related note, should at least a
label removecommand as well. Alabel editmight also be useful, but alabel create --forcewill accomplish the same thing.samcoe commentedon Apr 21, 2022
I responded inline regarding these proposals, so I will just briefly summarize here.
I am not convinced that removing the default limit is the right direction for a couple reasons.
I am onboard with adding
--orderand--searchflags with functionality that is backed by the API. Adding this functionality makes the default limit more valuable IMO.The labels are ordered by created at date when returned from the API.
A
label removecommand makes sense to me butlabel editseems redundant withlabel create --force. Perhaps that is okay though sincelabel editis more discoverable and explicit.Griffin641498 commentedon Apr 22, 2022
heaths commentedon Apr 22, 2022
@samcoe I've got this nearly finished, but found a bug with the
LabelConnectionGraphQL type: if you specify aquery, theorderByhas no effect. I can work around this, but would be great to see a fix for GraphQL.Add search and sort options to `label list`
heaths commentedon Apr 22, 2022
I've got this done but waiting for #5452 so I can rebase it onto trunk and submit a clean PR.
Add search and sort options to `label list`
Add search and sort options to `label list`