badges / shields

Concise, consistent, and legible badges in SVG and raster format
https://shields.io
Creative Commons Zero v1.0 Universal
23.47k stars 5.49k forks source link

Badge request: quay.io #357

Closed glerchundi closed 4 years ago

glerchundi commented 9 years ago

This is a docker image builder service:

They dont't seem to provide public API access, just a svg url, is this enough? For example: https://quay.io/repository/glerchundi/parkeeper/status.

Thanks!

espadrine commented 9 years ago

Thanks for pointing it out!

I do rely on SVG scraping for some things, but I tend to de-prioritize implementing that, since it can be brittle and requires more work later. It seems they use Shields.io internally.

If you can ask the quay folks whether they plan on adding an API, I would be very grateful!

jzelinskie commented 9 years ago

Quay dev here: What kind of API do you guys expect? We'd love to be able to be officially supported by shields.io instead of just hosting our own SVGs.

espadrine commented 9 years ago

@jzelinskie A common strategy is to download the badge you wish for from http://img.shields.io/badge/insert-text-green.svg and serve it to users.

If you wish the badges to be available under the img.shields.io domain, we need an API, preferably JSON, that gives us enough information to construct the badge.

jzelinskie commented 9 years ago

@espadrine we currently do the former (hosting of SVGs we downloaded from you guys), but we have an API that exposes this info: the phase attribute returned by this API call http://docs.quay.io/api/swagger/#!//getRepoBuilds

An example value to put in the repository field is jzelinskie/chihaya

espadrine commented 9 years ago

Neat!

rexwangcc commented 5 years ago

Any progress on this? The API of quay.io has been changed, not sure if the method proposed above is still feasible.

paulmelnikow commented 5 years ago

Just wanted to put out there that Shields is a community project, and that means you can help make this happen! 👐 We have a great tutorial and welcome anyone who would like to dig into this! Our maintainer team is happy to provide guidance on the API design and provide assistance with the implementation. We've had many first-time contributors who don't use JavaScript and have tried to make the first-time contributing experience as straightforward as possible.

rexwangcc commented 5 years ago

@paulmelnikow Thanks for the prompt reply! Yeah, I'd be really excited to contribute to this great project. Specifically on this issue, my concern is that quay.io might not be providing sufficient information through their endpoints to build such a badge at the moment 🤔 Let me do some research and see if I could try to make this happen!

paulmelnikow commented 5 years ago

Sounds great!

Another thing to keep in mind whether there is an authentication requirement. As a rule we don't allow passing read-write credentials to the server for security reasons. We can install a production API token, though it won't be specific to any particular projects.

Also, if you want to, you could play around with a live implementation using RunKit and our beta Endpoint badge: #2838.

paulmelnikow commented 4 years ago

Notice this was tagged good first issue, though I removed that tag since I'm not sure whether we have the upstream API we need.

mathbunnyru commented 11 months ago

I would really like to have quay.io badges for image size, pulls, and stars. Should I open another issue?