Skip to content

Skip re-fetching PRs already merged/closed#9

Merged
kwsantiago merged 1 commit into
mainfrom
skip-terminal-refetch
Jul 13, 2026
Merged

Skip re-fetching PRs already merged/closed#9
kwsantiago merged 1 commit into
mainfrom
skip-terminal-refetch

Conversation

@kwsantiago

Copy link
Copy Markdown
Contributor

Daily deploys on the built-in token spent ~20 min because --ingest re-fetched all ~900 spec PRs each run (TTL 1 day), most of them long-since merged upstream.

pr_status now reuses a cached terminal state (merged/closed/missing) past its TTL instead of spending an API call — those never change — and touches the cache mtime so it stays display-fresh. Only open (and uncached) PRs actually hit the network, so the ingest drops from ~900 to the ~100 open PRs and finishes in a couple minutes. A reopened PR is rare and self-heals on a manual refresh (refresh=1 bypasses this).

Verified: a merged entry is reused past TTL with no network call (even with a bad token); an open entry still fetches.

@kwsantiago kwsantiago merged commit d8a1bfe into main Jul 13, 2026
1 check passed
@kwsantiago kwsantiago deleted the skip-terminal-refetch branch July 13, 2026 23:17
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.

1 participant