solve the statistics count of active project and contributors#596
solve the statistics count of active project and contributors#596SWADHIN300 wants to merge 1 commit intoAOSSIE-Org:mainfrom
Conversation
📝 WalkthroughWalkthroughThis change centralizes organization statistics by introducing a new configuration file ( Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/config/orgStats.ts (1)
1-5: Consider freezing orgStats to prevent accidental mutation.This keeps the shared config as a true source of truth and avoids runtime edits from other modules.
♻️ Proposed change
-export const orgStats = { - activeProjects: 34, - totalContributors: 500, - communityCount: 3800, -}; +export const orgStats = Object.freeze({ + activeProjects: 34, + totalContributors: 500, + communityCount: 3800, +} as const);🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/config/orgStats.ts` around lines 1 - 5, The orgStats exported object is mutable; freeze it to prevent accidental runtime changes by wrapping or replacing the export with a frozen object (use Object.freeze(orgStats) or export const orgStats = Object.freeze({...}) ), and if you expect nested mutable values add a simple deepFreeze helper and apply it to orgStats; update references to the orgStats symbol accordingly so consumers get an immutable config.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@src/config/orgStats.ts`:
- Around line 1-5: The orgStats exported object is mutable; freeze it to prevent
accidental runtime changes by wrapping or replacing the export with a frozen
object (use Object.freeze(orgStats) or export const orgStats =
Object.freeze({...}) ), and if you expect nested mutable values add a simple
deepFreeze helper and apply it to orgStats; update references to the orgStats
symbol accordingly so consumers get an immutable config.
Addressed Issues:
Centralize and synchronize organization stats
Fixes #575
previous -

After chnage-


align with
Checklist
AI Usage Disclosure
Check one of the checkboxes below:
Summary by CodeRabbit