ExpediaGroup / expediagroup.github.io

The Expedia Group Open Source portal, a website for discovering EG open source projects.
https://opensource.expediagroup.com
Apache License 2.0
66 stars 8 forks source link

Repo image from Github API keeps changing url #66

Open ffeltrinelli opened 1 month ago

ffeltrinelli commented 1 month ago

The field openGraphImageUrl that we take from GH's GraphQL API and use for repository's image has this kind of pattern:

https://opengraph.githubassets.com/f738e6fb5f7a97257d275344c8890c6349cc60cd21803e606bc6ea8ca29ebf53/ExpediaGroup/expediagroup.github.io

where the hash in the middle seems to change too frequently. This is probably because the default generated image - in those cases where the repository owners did not specify a custom repo image - contains dynamic details.

Moreover, this default generated image does not seem to make much sense if shown as card in the website.

In these cases where the repo owners did not specify a repo image, should we just use a default Expedia image instead?

ffeltrinelli commented 1 month ago

I've uploaded a custom social image for this repo expediagroup.github.io, as it seems it was the url that was changing the most (I don't know why):

https://repository-images.githubusercontent.com/347094132/4a66b310-79fb-4d17-bc9d-deebf5558760

I'll monitor this for a while and see if this was enough to solve the problem.

ffeltrinelli commented 1 month ago

The problem is still present, see this last commit: https://github.com/ExpediaGroup/expediagroup.github.io/commit/302606363b6a2db50446030d81d98220f93adc5c#diff-05d65c475110b16eee6544b05ca998ee1c0a3ae65f8ecbcd22c575f9dcfcceb7R82

The default social images are re-generated every now and then, even if the image looks exactly the same. See for example: previous image: https://opengraph.githubassets.com/30f3dbdef05fe87d3bdedb5b08ea8cc2180adf96ad2d873b87e528d531f7f0cd/ExpediaGroup/cypress-codegen new image: https://opengraph.githubassets.com/7577db48dde1f3adc46ae15e6d2d820f54d27b6eb9a4158b5186ec766d101d79/ExpediaGroup/cypress-codegen

I don't think we really need them, we could just put a default image in these cases.