Releases API - can't figure out order #21901
-
Hi, i can’t figure out how releases are sorted in the “releases” API. As far as i understand it used to sort releases by “published_at” descendent, but now i found that in https://api.github.com/repos/Cockatrice/Cockatrice/releases the first listed release is older than the second release:
2. Release-2.5.0 is dated:
If you look at the “releases” page instead: https://github.com/Cockatrice/Cockatrice/releases , they are correctly sorted by date. Did i wrongly assume that releases in the API page are sorted or did i stumble upon a strange behavior of he releases api? Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
There isn’t a guarantee of a sort order in the API documentation, so I wouldn’t assume that any particular sort order is guaranteed. It looks like it is still sorted by |
Beta Was this translation helpful? Give feedback.
There isn’t a guarantee of a sort order in the API documentation, so I wouldn’t assume that any particular sort order is guaranteed. It looks like it is still sorted by
published_at
with the exception that theprerelease: true
record is first. So it is possible that it is ordered first byprerelease
and then bypublished_at
, but since there is no documented guaranteed sort order it is probably not wise to depend on that behavior.