-
Notifications
You must be signed in to change notification settings - Fork 928
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
gencomponentdocs support module all to generate all karmada components docs #6184
base: master
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #6184 +/- ##
==========================================
- Coverage 47.97% 47.97% -0.01%
==========================================
Files 674 674
Lines 55841 55841
==========================================
- Hits 26788 26787 -1
- Misses 27305 27306 +1
Partials 1748 1748
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
e1de77c
to
9809e1d
Compare
…s docs Signed-off-by: zhzhuang-zju <[email protected]>
9809e1d
to
6654fee
Compare
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.
PR Overview
This PR refactors the gencomponentdocs tool to support generating documentation for all components at once rather than one by one.
- Refactored the main function to handle multiple commands.
- Added a new "all" module case that generates documentation for all karmada components.
Reviewed Changes
File | Description |
---|---|
hack/tools/gencomponentdocs/gen_component_docs.go | Refactored command generation to support the "all" module and improved error handling |
Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (2)
hack/tools/gencomponentdocs/gen_component_docs.go:87
- [nitpick] Consider using context.TODO() instead of nil for the scheduler command to maintain consistency with the other commands that use context.TODO().
cmds = append(cmds, schapp.NewSchedulerCommand(nil))
hack/tools/gencomponentdocs/gen_component_docs.go:109
- Ensure that the new 'all' module functionality is covered by corresponding tests to verify that all commands are generated correctly.
case "all":
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
When releasing documents, it is necessary to generate reference documents for different components through gencomponentdocs. Currently, only the generation of individual components one by one is supported, which is inefficient and prone to omissions. In actual usage scenarios, a more common situation is to generate reference documents for all components at once. Therefore, I hope to introduce the "module all" to support the full-scale generation of component reference documents.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Before:
After:
Does this PR introduce a user-facing change?: