Somsubhra / github-release-stats

Get the latest release stats of your project on Github
https://somsubhra.github.io/github-release-stats/
MIT License
523 stars 85 forks source link

Release ordering wrong #41

Closed tooomm closed 2 years ago

tooomm commented 6 years ago

Here an example: ordering wrong The beta of v2.5.0 got obviously released before the full release and should be ordered second here. No matter if it's a pre-release or not. In this example the full release might got drafted before the beta.16 was created. This still shouldn't happen.

At GitHub releases it's displayed in correct order for tags and releases: releases-tags

Releases should be always sorted by "release date" (aka "published") in the first place!

(This might be related to https://github.com/Somsubhra/github-release-stats/issues/13)

tooomm commented 6 years ago

Potential explanation why it's falsely ordered like that: https://github.community/t5/How-to-use-Git-and-GitHub/Releases-API-can-t-figure-out-order/m-p/5037#M1640

The API has no documented ordering, but it looks like it includes releases with the pre-release tag always first in the reply.

The github-release-stats page should instead sort the reply regarding the published_at date.

tooomm commented 2 years ago

I merged the proposed fix by @nogginbox in my fork: https://github.com/tooomm/github-release-stats/commit/0e49e7610c60c3a733667ae4922c3bef481a5884