{{ message }}
fix: avoid duplicate mock sponsors#918
Open
MoonBrillante wants to merge 2 commits into
Open
Conversation
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/utils/sponsors.functions.ts (1)
222-230: 💤 Low valueConsider extracting the mock sponsor list to a shared constant.
The same mock sponsor array is defined in both
src/utils/sponsors.functions.tsandsrc/server/sponsors.ts. While this duplication is low-risk for fallback data, extracting it to a shared constant would improve maintainability if the list needs updating in the future.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/utils/sponsors.functions.ts` around lines 222 - 230, The mockSponsors array is currently duplicated in two separate files. Extract this array to a shared constant in a central utilities file or constants file that can be imported by both locations, then update the mockSponsors definition in sponsors.functions.ts and its duplicate in sponsors.ts to import and reference this shared constant instead of maintaining separate copies.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/utils/sponsors.functions.ts`:
- Around line 222-230: The mockSponsors array is currently duplicated in two
separate files. Extract this array to a shared constant in a central utilities
file or constants file that can be imported by both locations, then update the
mockSponsors definition in sponsors.functions.ts and its duplicate in
sponsors.ts to import and reference this shared constant instead of maintaining
separate copies.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: f57a377f-cbba-415b-9b7f-81a740a2e1d8
📒 Files selected for processing (2)
src/server/sponsors.tssrc/utils/sponsors.functions.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fixes #916
This updates the GitHub sponsors fallback data used when credentials are missing.
Previously, the mock sponsor list repeated the same sponsors 20 times each, which could make the sponsor graphic look like it contained many more unique sponsors than it actually did.
The fallback now keeps the same mock sponsors but returns each one only once.
Summary by CodeRabbit