Skip to content

Fix stale GitHub data persistence after failed fetches#303

Merged
mehul-m-prajapati merged 4 commits into
GitMetricsLab:mainfrom
jagriti-aswal:fix-misleading-private-repo-error
May 20, 2026
Merged

Fix stale GitHub data persistence after failed fetches#303
mehul-m-prajapati merged 4 commits into
GitMetricsLab:mainfrom
jagriti-aswal:fix-misleading-private-repo-error

Conversation

@jagriti-aswal
Copy link
Copy Markdown
Contributor

Related Issue

Closes #302


Description

This PR fixes stale GitHub data persistence after failed fetch requests in the Tracker UI.

Changes made:

  • Cleared previous issues/PR state before initiating a new fetch request
  • Prevented stale GitHub data from remaining visible after failed fetches
  • Replaced Promise.all() with Promise.allSettled() for improved partial failure handling
  • Improved distinction between complete fetch failures and partial fetch failures
  • Centralized full-fetch error handling through the existing catch block
  • Improved fetch lifecycle consistency and UI accuracy

How Has This Been Tested?

  • Successfully fetched GitHub data for a valid public account
  • Triggered failed fetch requests using invalid/random PAT values
  • Verified stale PR/issue data no longer persists after failed requests
  • Verified partial and complete fetch failure scenarios behave correctly

Screenshots (if applicable)

Before

Screenshot 2026-05-17 212123

Old PR data remained visible even after failed fetch requests.

After

Previously displayed PR data is cleared after failed fetch requests.

Screenshot 2026-05-17 212022

Type Of Change

  • Bug fix
  • New feature
  • Code style update
  • Breaking change
  • Documentation update

@netlify
Copy link
Copy Markdown

netlify Bot commented May 17, 2026

Deploy Preview for github-spy failed.

Name Link
🔨 Latest commit 9350d53
🔍 Latest deploy log https://app.netlify.com/projects/github-spy/deploys/6a0dde3bb0a0f70008c95086

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 17, 2026

Warning

Rate limit exceeded

@mehul-m-prajapati has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 43 minutes and 49 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: bb43a296-4ea4-421a-bbe4-29b11dd545f2

📥 Commits

Reviewing files that changed from the base of the PR and between 4596dda and 9350d53.

📒 Files selected for processing (1)
  • src/hooks/useGitHubData.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@mehul-m-prajapati mehul-m-prajapati merged commit 06a5665 into GitMetricsLab:main May 20, 2026
2 of 6 checks passed
@github-actions
Copy link
Copy Markdown

🎉🎉 Thank you for your contribution! Your PR #303 has been merged! 🎉🎉

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stale GitHub data persists after failed fetch requests.

2 participants