endoflife.date
endoflife.date copied to clipboard
API: Include changelog template?
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:
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 thechangelogTemplate
, 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.
Thanks for opening your first issue here! Be sure to follow the issue template!
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.
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
This will probably done in #2080.