Skip to content

fix(github): prevent score wipeout on PR search failure and fallback - #281

Merged
O2sa merged 3 commits into
mainfrom
fix/prevent-pr-fetch-score-wipeout
Nov 21, 2026
Merged

O2sa merged 3 commits into
mainfrom
fix/prevent-pr-fetch-score-wipeout

Conversation

@O2sa

@O2sa O2sa commented Nov 21, 2026

Copy link
Copy Markdown
Owner

Summary of Changes Committed

src/lib/github/github-client.ts:
Throws prResult.reason on pull request query failures rather than silently assigning pullRequests = [] and corrupting the cache.
Retains a staleFallback reference when reading an expired database record, allowing getUserData to fall back gracefully to the existing data if the GitHub API fails or rate-limits.

src/lib/github/tests/github-cache.test.ts:
Added unit test asserting that failed PR searches reject properly and do not cache empty PR arrays.

Comment thread src/lib/github/github-client.ts Fixed
@O2sa
O2sa merged commit b5f21de into main Nov 21, 2026
5 of 6 checks passed
@O2sa

O2sa commented Nov 21, 2026

Copy link
Copy Markdown
Owner Author

✨ Thank you, @O2sa! Another great contribution merged! 🚀

You've been a fantastic contributor! We truly appreciate your continued support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants