Skip to content

Fix stale GitHub data persistence after failed fetches#303

Open
jagriti-aswal wants to merge 3 commits into
GitMetricsLab:mainfrom
jagriti-aswal:fix-misleading-private-repo-error
Open

Fix stale GitHub data persistence after failed fetches#303
jagriti-aswal wants to merge 3 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 ready!

Name Link
🔨 Latest commit fc3b8ff
🔍 Latest deploy log https://app.netlify.com/projects/github-spy/deploys/6a09e477b52dc600072b40eb
😎 Deploy Preview https://deploy-preview-303--github-spy.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 17, 2026

Warning

Rate limit exceeded

@jagriti-aswal has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 6 minutes and 35 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: 2932f89d-cf74-4d6b-9bfa-919c29cc826c

📥 Commits

Reviewing files that changed from the base of the PR and between 8d17610 and fc3b8ff.

📒 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.

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.

1 participant