Skip to content

fix(widgets): busy pull requests no longer time out GitHub's search - #80

Merged
ascorbic merged 3 commits into
mainfrom
mk/emdash-bugfixes-pr-73ea7a
Dec 1, 2026
Merged

ascorbic merged 3 commits into
mainfrom
mk/emdash-bugfixes-pr-73ea7a

Conversation

@ascorbic

@ascorbic ascorbic commented Dec 1, 2026

Copy link
Copy Markdown
Owner

Brings over the one bugfix from the emdash-cms/tack fork. The fork's instance config (tack.emdashcms.com) is left out.

A list searched GitHub for up to 50 items with full card data in a single GraphQL request. For pull requests with many checks, GitHub goes past its 10 s limit and answers 502 or 504 (or an empty 200), so the list showed "GitHub answered 504." every time.

  • Issue search now asks only for ids, then reads the items by node id in batches of 20, in parallel, keeping the search's order.
  • An empty body is treated as an error rather than throwing.
  • Card fetches also use batches of 20.
  • New tests are in test/github-search.test.ts.

Checks: pnpm check and pnpm build pass. pnpm test has two failures that also happen without this change: test/widget-queries.test.ts > milestone and stale finder queries fails on main as well, and test/docs-agents.test.ts fails because a site dependency wasn't installed in my local worktree.

A list searched GitHub for up to 50 items with full card data in one
GraphQL request. For pull requests with many checks that takes GitHub
past its 10 s limit, and it answers 502 or 504 (or an empty 200), so the
list showed "GitHub answered 504." every time.

Issue search now asks only for ids, then reads the items by node id in
batches of 20, side by side, keeping the search's order. An empty body is
an error rather than a throw. Card fetches use batches of 20 too.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ 310e5da 2026-12-01T11:50:34.860Z View logs ↗
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ cc97251 2026-12-01T11:38:14.834Z View logs ↗
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ e9757a2 2026-12-01T11:30:26.419Z View logs ↗

…fore the run, so the stale finder never counts them as quiet once October has passed
… the page loads, so the stale finder only finds the ones meant to be quiet
@ascorbic
ascorbic merged commit 814237c into main Dec 1, 2026
7 checks passed
@ascorbic
ascorbic deleted the mk/emdash-bugfixes-pr-73ea7a branch December 1, 2026 11:58
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