refactor: generate rule-manifest locally during website build#461
refactor: generate rule-manifest locally during website build#461
Conversation
Replace the CI workflow + GitHub raw URL fetch approach with local generation during website build. The Rspress beforeBuild hook now runs gen-rule-manifest.js to produce the manifest, and rule.tsx imports the generated JSON directly instead of fetching it via SWR.
Summary of ChangesHello @fansenze, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request refactors the data sourcing mechanism for the website's rule manifest. By transitioning from a remote fetching approach to local generation during the build process, the system gains improved reliability and efficiency. This change ensures that the website always uses the most current rule data without relying on external network requests at runtime, simplifying the component logic and reducing potential points of failure. Highlights
Changelog
Ignored Files
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request successfully refactors the rule manifest generation process from a CI workflow with remote fetching to a local generation during the website build. This change simplifies the client-side code by removing the need for useSWR and external API calls, leading to a more robust and self-contained build process. The changes are well-implemented and align with the stated goals of the pull request.
Deploying rslint with
|
| Latest commit: |
4a3bf00
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://9b350bf2.rslint.pages.dev |
| Branch Preview URL: | https://refactor-inline-rule-manifes.rslint.pages.dev |
Summary
Replace the CI workflow + GitHub raw URL fetch approach with local generation during website build:
gen-rule-manifest.jsoutput towebsite/generated/rule-manifest.jsonbeforeBuildhook plugin (plugin-rule-manifest.ts) to auto-generate manifest before buildrule.tsxto directly import local JSON instead of SWR + remote fetchupdate-rule-manifest.ymlCI workflow, oldpreload-plugin.ts, and committedrule-manifest.jsonwebsite/generated/to.gitignoreRelated Links
N/A
Checklist