EPMRPP-114309 || Fix incorrect redirect for release documentation URL…#1107
EPMRPP-114309 || Fix incorrect redirect for release documentation URL…#1107maria-hambardzumian wants to merge 2 commits into
Conversation
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 0/1 reviews remaining, refill in 28 minutes and 46 seconds.Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
docusaurus.config.js (1)
588-806: Consider generating repetitive release redirects from data.Lines 588–806 are highly repetitive. Building these entries from version arrays would reduce typo risk and future maintenance overhead.
♻️ Refactor sketch
+const canonicalReleaseVersions = [ + '25.1.1', '25.0.4', '25.1.4', '25.0.5', '25.1.11', + '25.1', '24.1', '25.1.10', '24.2.2', '25.1.9', + // ... +]; + +const canonicalReleaseRedirects = canonicalReleaseVersions.map((v) => ({ + to: `/releases/Version${v}/`, + from: `/releases/Version${v}`, +})); + +const aliasedReleaseRedirects = [ + { + to: '/releases/Version25.1.5/', + from: ['/releases/Release25.1.5', '/releases/Release25.1.5/', '/releases/Version25.1.5'], + }, + { + to: '/releases/Version26.0.1/', + from: ['/releases/Release26.0.1', '/releases/Release26.0.1/', '/releases/Version26.0.1'], + }, + // ... +]; ... redirects: [ // existing non-release redirects... - { to: '/releases/Version25.1.1/', from: '/releases/Version25.1.1' }, - { to: '/releases/Version25.1.5/', from: ['/releases/Release25.1.5', '/releases/Release25.1.5/', '/releases/Version25.1.5'] }, - // ...many more... + ...canonicalReleaseRedirects, + ...aliasedReleaseRedirects, ],🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docusaurus.config.js` around lines 588 - 806, The redirects list is manually repeating many release entries; replace it by creating a structured array (e.g., const releases = [...]) and a helper (e.g., buildReleaseRedirects or generateReleaseRedirects) that maps each version to the { to: '/releases/VersionX/', from: [...] } objects and then spread the result into the redirects array used in docusaurus config; update references in the config to use that generated array (look for the redirects array and entries with keys to/from in docusaurus.config.js) so future versions are added by updating the releases array only.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@docusaurus.config.js`:
- Around line 588-806: The redirects list is manually repeating many release
entries; replace it by creating a structured array (e.g., const releases =
[...]) and a helper (e.g., buildReleaseRedirects or generateReleaseRedirects)
that maps each version to the { to: '/releases/VersionX/', from: [...] } objects
and then spread the result into the redirects array used in docusaurus config;
update references in the config to use that generated array (look for the
redirects array and entries with keys to/from in docusaurus.config.js) so future
versions are added by updating the releases array only.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: f6dfdcb7-8228-4f61-9de7-3d9f51fbb694
📒 Files selected for processing (1)
docusaurus.config.js
…lease documentation URLs
…s v2
Summary by CodeRabbit