-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
docs(datasource): All items in the urls array are wrapped between []() character. #31222
base: main
Are you sure you want to change the base?
docs(datasource): All items in the urls array are wrapped between []() character. #31222
Conversation
Hey, Thanks for going the effort to add names to all the urls. 🙌 You will also need to add a test to make sure that all the urls in the versioning & manager module have are wrapped in For this, we will need a test in the Since, this is your first time contributing it could be tiring to figure out how the tests work. Here's an example for the versioning module. Based on it, you can try to write on for the maangers module too. Add this to the
It goes through each versioning module, takes the |
data/kubernetes-api.json5
Outdated
'image.toolkit.fluxcd.io/v1beta2', | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revert and do in separate PR
lib/modules/manager/index.spec.ts
Outdated
const urlRegex = regEx(/^\[.*\]\(.*\)$/); | ||
|
||
for (const [managerName, managerModule] of Object.entries(loadedMgr)) { | ||
const urls = (managerModule as { urls?: string[] }).urls ?? []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const urls = (managerModule as { urls?: string[] }).urls ?? []; | |
const urls = (managerModule as { urls?: string[] })?.urls ?? []; |
why the cast? 🤔 we've an interface for them, see docs generation inside tools folder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its not needed for the manager module because ManagerApi
extends ModuleApi
which has the preoperty urls
.
But, the VersioningApi
is stand-alone and does not extend the ModuleApi
, so it doesn't allow the urls
property.
Needs to be fixed in diff PR, first Or we could use the Versioning
type defined in the tools/docs/versioning.ts
lib/modules/versioning/index.spec.ts
Outdated
|
||
const urlRegex = regEx(/^\[.*\]\(.*\)$/); | ||
for (const [verName, verModule] of Object.entries(loadedVers)) { | ||
const urls = (verModule as { urls?: string[] }).urls ?? []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see other comments
lib/modules/manager/index.spec.ts
Outdated
const urlRegex = regEx(/^\[.*\]\(.*\)$/); | ||
|
||
for (const [managerName, managerModule] of Object.entries(loadedMgr)) { | ||
const urls = (managerModule as { urls?: string[] }).urls ?? []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const urls = (managerModule as { urls?: string[] }).urls ?? []; | |
const urls = managerModule?.urls ?? []; |
Fixes #30312
Changes
Updated the
formatUrls
function to correctly format and escape URLs in the documentation. Fixed bad links and ensured that links inconst urls
are properly validated.Context
This PR addresses issues with broken links in the documentation and improves URL formatting to prevent build errors and improve the readability of generated documentation.
Replaces #31161
Documentation (please check one with an [x])
How I've tested my work (please select one)
I have verified these changes via: