Skip to content

Stars sorting#2363

Open
cookie1170 wants to merge 7 commits intobevyengine:mainfrom
cookie1170:stars-sorting
Open

Stars sorting#2363
cookie1170 wants to merge 7 commits intobevyengine:mainfrom
cookie1170:stars-sorting

Conversation

@cookie1170
Copy link

Why

Being able to see star counts on assets, as well as assets with more stars being shown first makes it easier to find quality assets, especially as the number of assets grows.

What

This PR adds support for fetching stars on GitHub and GitLab for assets in bevy-assets, as well as changing the sort to take stars into account.
The new sort order is:

  • Assets with a manually assigned order in bevy-assets
  • Assets that are semver compatible with bevy, sorted by stars
  • Assets that aren't semver compatible, sorted by stars

How

For each asset, the algorithm looks at its link:

  • If it's a link to GitHub or GitLab, then fetch the star info from there
  • If it's a link to crates.io, or it has a crate and the previous fetch failed; look at its repository field

Example

Here is the 2D section of assets before the change:

image And after: image

@cart
Copy link
Member

cart commented Feb 20, 2026

Just dumping some context I found here (doesn't need to be done in this PR unless you really want to). Codeberg API requires no authentication:

GET https://codeberg.org/api/v1/repos/guix/guix. Stars are under the stars_count json field in the response.

Docs: https://codeberg.org/api/swagger#/repository/repoGet

@alice-i-cecile alice-i-cecile added C-Feature A new feature, making something new possible A-Assets The collection of ecosystem crates found on the Bevy Assets page X-Controversial There is active debate or serious implications around merging this PR S-Admin-Required A Bevy Foundation admin is needed for this work. labels Mar 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Assets The collection of ecosystem crates found on the Bevy Assets page C-Feature A new feature, making something new possible S-Admin-Required A Bevy Foundation admin is needed for this work. X-Controversial There is active debate or serious implications around merging this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants