Skip to content
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

Show shields.io badges #94

Open
alexeagle opened this issue Aug 23, 2023 · 3 comments
Open

Show shields.io badges #94

alexeagle opened this issue Aug 23, 2023 · 3 comments

Comments

@alexeagle
Copy link
Contributor

Split out from #29 which is related but not the same.

I made https://bazel-contrib.github.io/bazel-catalog/ as a stab at showing adoption numbers. According to the Bazel team's policy, the bcr-ui can only use the data in bazel-central-registry and not store any ancillary data or "curated recommendations", which is why bazel-catalog exists.

However, things like number of stars/forks and download count are objective data we could easily show for anything in the bcr that has a GitHub or GitLab repo, and would be pretty trivial to add.

WDYT @hobofan ?

@hobofan
Copy link
Member

hobofan commented Aug 24, 2023

You mean rather than building something that collects stars/downloads per repo, using shields.io badges to display those stats?

The only potential problem I see with that is that it would run via a different domain/host, opening up some privacy concerns (which Github itself mitigates by using proxies for the badges). I personally wouldn't have a problem with that, but I'm not sure what the opinions in the wider community are regarding that.

@alexeagle
Copy link
Contributor Author

It's a valid concern. Since our site is already served by GitHub Pages, I wonder if we can use that same Github proxy to serve these requests?

@alexeagle
Copy link
Contributor Author

I see that https://github.com/badges/shields/blob/master/README.md itself is requesting
https://camo.githubusercontent.com/68c67639481bf7ac593d62dbff15e2909a6dc819bb75e86233336343a72d5580/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6e7472696275746f72732f6261646765732f736869656c6473
which uses https://github.com/atmos/camo but that repo is now archived.

From a bit of research I'm skeptical that we can produce these camo URLs https://stackoverflow.com/questions/73666498/how-do-i-generate-the-github-camo-url-for-an-image-used-in-a-github-wiki

From the documentation https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/about-anonymized-urls I can't see any indication this is supported in the Jekyll renderer that GitHub Pages is using.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants