-
Notifications
You must be signed in to change notification settings - Fork 2
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
Sorting milestones list #13
Comments
doing
noticed there's a sorting option
the implied --orderBy.field number there does the job in my case since the temporal order of creation of my milestones is the same as their semantic ordering (based on their title that uses a semantic version string) However, I need to output only a list of milestone titles. There's a --jq option there and experimented a bit with that with no success. Now I'm getting
and I need to get back instead: |
to get just the 2nd column of the output (the title) and to skip the first three lines - the " Showing 48 milestones" is preceeded and followed by an empty line) I used in DOS batch file a FOR command with /F "skip=3 tokens=2" like below:
|
However, GitHub seems to have reused probably a deleted index number from a milestone that had been removed (though I don't remember removing one) for my 0.6.0 milestone, ending up in it using number 20 and its previous and next ones using numbers 45 an 46 instead. Nevertheless they happen to sort fine in https://github.com/Zoomicon/READCOM_App/milestones?state=closed using the "Recently updated" Sort order (the default). Obviously if I edit an older one it will damage the sorting in that page. I don't see any way to sort semantically in that page either (nor to sort by creation date or index number of milestone), and that doesn't even have a way to show both open and closed ones (tried puttin ?state=all at the url with no success) So semantic sorting is still useful to have, can't trust the number of the milestone as it seems that GitHub doesn't leave gap numbers if you delete a milestone (next one will use the gap number instead of the highest number + 1) |
I'm trying to list issues per milestone, I've had progress with
cli/cli#6178
gh-milestone extension isn't used there, but it could as well have been used to get the list of milestone names that is done in the first step of the iterative solution
I have the issue that the milestones are returned in an order for which I can't specify sorting. In specific I'd like to do semantic version SORTING that the bash "sort -V" command can do but on DOS batch that I use there is no ready-made alternative for doing semantic sorting
Seems GitHub CLI supports sorting for other lists, can follow this path of discussions/docs on search's sort:
https://github.com/cli/cli/releases/tag/v1.8.0
https://cli.github.com/manual/gh_search_issues
https://docs.github.com/en/search-github/searching-on-github/searching-issues-and-pull-requests
https://docs.github.com/en/search-github/getting-started-with-searching-on-github/sorting-search-results
eg they have syntax:
`gh issue list -l "bug" --search "sort:interactions-desc"
they don't have a separate sort flag but do it via the search one
So similarly it would be nice to have something like
gh milestone list --search "sort:Version(title)"
or
gh milestone list --search "sort:title:version"
to treat the milestone title as a version string
(code would have to use some semantic version sorting routine though, since GitHub API doesn't seem to have sorting by a "semantic" string)
The text was updated successfully, but these errors were encountered: