endoflife.date icon indicating copy to clipboard operation
endoflife.date copied to clipboard

API: Include changelog template?

Open hugovk opened this issue 2 years ago • 4 comments

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is.

Sometimes the JSON response includes a link for a release:

[
  {
    "cycle": "21.04 'Hirsute Hippo'",
    "cycleShortHand": "HirsuteHippo",
    "lts": false,
    "release": "2021-04-22",
    "support": "2022-01-01",
    "eol": "2022-01-01",
    "latest": "21.04",
    "link": "https://wiki.ubuntu.com/HirsuteHippo/ReleaseNotes/"
  },
  {
    "cycle": "20.10 'Groovy Gorilla'",
    "cycleShortHand": "GroovyGorilla",
    "lts": false,
    "release": "2020-10-22",
    "support": "2021-07-22",
    "eol": "2021-07-22",
    "latest": "20.10"
  },
...

https://endoflife.date/api/ubuntu.json

Sometimes not:

[
  {
    "cycle": "9.2",
    "release": "2021-06-16",
    "support": "2021-12-08",
    "eol": "2022-06-01",
    "latest": "9.2.4"
  },
  {
    "cycle": "9.1",
    "release": "2020-12-02",
    "support": "2021-06-16",
    "eol": "2021-12-08",
    "latest": "9.1.12"
  },
...

https://endoflife.date/api/drupal.json

But in this latter case, there's a top-level changelogTemplate value:

changelogTemplate: https://wiki.ubuntu.com/__CYCLE_SHORT_HAND__/ReleaseNotes/ChangeSummary/__LATEST__/

https://raw.githubusercontent.com/endoflife-date/endoflife.date/master/products/drupal.md

And it's used to generate release links on the website:

image

https://endoflife.date/drupal

Describe the solution you'd like A clear and concise description of what you want to happen.

Would it be a good idea to:

  • generate links for each release from the changelogTemplate, and include in the JSON?
  • or include the changelogTemplate top-level value in the JSON, for API users to generate links themselves? (Would need to make sure all template variables are available too.)

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

No change.

hugovk avatar Sep 16 '21 08:09 hugovk

Thanks for opening your first issue here! Be sure to follow the issue template!

welcome[bot] avatar Sep 16 '21 08:09 welcome[bot]

I did some work to make it modular in recent changes to changelogTemplate, shouldn't be too hard to re-use that it in the API as well.

captn3m0 avatar Sep 16 '21 14:09 captn3m0

If you'd like to work on this:

  • This is how the release link is generated for the HTML pages: https://github.com/endoflife-date/endoflife.date/blob/53b9a6f4f1a242fd11f68c1a0449eeb594e47856/_layouts/post.html#L48-L55
  • The equivalent changes would have to be made here: https://github.com/endoflife-date/endoflife.date/blob/master/_plugins/create-json-files.rb

Make sure you read through CONTRIBUTING.md to understand the file structure, and go through this PR. Also, please read through the HACKING.md file to setup the project locally. Reading these will help you get onboarded faster and make sure that your PR sees a speedy merge.

And finally, we have a very helpful guide for new contributors during Hacktoberfest as well.

To test your changes, validate these pages:

  • /api/fedora.json
  • /api/fedora/34.json

captn3m0 avatar Sep 27 '21 06:09 captn3m0

This will probably done in #2080.

marcwrobel avatar Dec 19 '22 23:12 marcwrobel