endoflife-date / endoflife.date

Informative site with EoL dates of everything
https://endoflife.date
MIT License
2.49k stars 772 forks source link

Support shields.io #2003

Open adriens opened 1 year ago

adriens commented 1 year ago

:grey_question: Context

Using badges is a very convenient way of being aware of a very wide amount of datas :

image

:bulb: The idea

The product could be used as a query paramater :

image

:pray: Feature request

captn3m0 commented 1 year ago

Last I remember, the shields project had a huge backlog of pending requests. Open to making something similar, could you give examples of how the URLs would look?‘/badge/:project/:version’ returns a Project: Version badge in red, orange, or green?-NemoOn 10-Dec-2022, at 03:32, SALES @.***> wrote: ❔ Context Using badges is a very convenient way of being aware of a very wide amount of datas :

💡 The idea

The main idea would to be get EoL related badges (Java, maven, jhipster, npm,...) with colors and status.

The product could be used as a query paramater :

🙏 Feature request

Implement dedicated JSON endpoint Contrbute badge to shields.io

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

adriens commented 1 year ago

Hi @captn3m0 here are some ideas :

endofife.date API input could be :

then sending back :

{
  "schemaVersion": 1,
  "label": "{product}",
  "message": "{latest}",
  "color": "{color based on support flag}"
}

and also about the latest :

input :

Then return

{
  "schemaVersion": 1,
  "label": "{product}",
  "message": "{latest version}",
  "color": "{color always green}"
}
adriens commented 1 year ago

Once the API endpoint is implemented it's quite easy to use it at our own convenience, i aleady did it on some side projects

captn3m0 commented 1 year ago

I like the idea, but I'm still unclear on what the usage is going to look like? Is this meant for end-projects (that use products we've listed), or for the products themselves?

Say, I build a project that uses PHP 8.0 (Supported) but it is currently pinned to PHP 8.0.25 (Unsupported).

What should the badge in the README use? If I put a badge that says php8.0, it might be invalid. Pinning it to the actual version might be too cumbersome for most projects.

If I'm a project using PHP8.0.5, and embed a badge (as described above by using the release cycle), it would show:

label: PHP message: 8.0.26 Color: Green

which might be misleading? What is version in your proposal? releaseCycle or latest? Using the former will be easier, but could be misleading. The latter is too cumbersome.

marcwrobel commented 1 year ago

Same here: I fail to see when such badge could be used. Do you have concrete example @adriens ?

I do not think that's for documentation (README?) of end projects that are using one of endoflife.date tracked product, because it would mean the version (or cycle ?) would have to be updated at the same in the project model and for the badge. So it would be easily forget, and not compatible with tools such as dependabot and renovate.

adriens commented 1 year ago

Yep, the main idea would to drop badges on projects README that would visually alert when the stack has reached an EOL.

The stack may include :

So within a single glance, you could see that there' an orange.red one :sweat_smile:

captn3m0 commented 1 year ago

Thinking of implementing this via 302 redirects to Shields for now, so we don't have to do any rendering. While I'm still skeptical of the usage, it might be beneficial to projects that are pinned to a release cycle (instead of a patch version).

We could offer multiple badges such as, a 3-tier badge for Supported/EOL/EOL Soon:

Say something like /api/ansible/:version/badge redirects you to:

If you are provide a patch version, perhaps we can provide a separate latest endpoint for those:

So /api/php/:version/latest-badge redirects you to:

adriens commented 1 year ago

Oh yes, it's such an excellent idea :clap: @captn3m0 :rocket:

captn3m0 commented 1 year ago

This would create thousands of redirects (there's gonna be one for each release cycle + one for each product version). Could try to minimize by using prefixes, but that might be inaccurate / hard.

We're currently at 500ish redirects (alternate_urls mainly), so this will be a huge bump. Reached out to Netlify to check once if this will be an issue (the redirect limits are not documented).

adriens commented 1 year ago

WOW I had no clue that would cause so much work for you guys :sweat_smile: :pray: