-
-
Notifications
You must be signed in to change notification settings - Fork 55
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
Past GitHub sponsors are randomly generated #42
Comments
We could do a sorting, PR welcome :) |
Can we add a sort: "ASC"
// or
sort: { name: "ASC" } |
We could always sort (by priority of sponsor amount -> sponsor date -> name alphabet). And maybe accepting a custom sort function if one wants to have full control (I imagine most of the cases there is no need to use it) |
Awesome. Agree on |
@antfu Always sorting includes all the providers? |
We could do that in the core instead of providers |
Yeah I think so |
@MichalLytek See #43 |
Can we close this? @antfu PS: My bad, I forgot to add Fix |
Describe the bug
I have a cron workflow which is supposed to refresh github sponsors every night.
However, I see that every night it's generating a new image and committing the changes, leading to polluting the master branch.
When I check the svg file diff, it's just about swapping the places of the past sponsors.
I think the
sponsorkit
should stable sort the fetched sponsors, so that the images are generated in the same way, so that the cron workflow will skip commit as no changes detected by git.In local mode,
cache.json
plays the role of the moderator, detecting no changes in fetched data.However, in a cron workflow it might be harder to achieve.
If I delete it, it's again randomizing order of past sponsors.
Reproduction
https://github.com/MichalLytek/type-graphql/blob/master/.github/workflows/sponsor.yml
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: