Skip to content

Create src/runs/pr-checks.ts and move the PR-merge/URL-parse group into…#391

Open
jayminwest wants to merge 2 commits into
mainfrom
warren/run_etn8ndfywq3k
Open

Create src/runs/pr-checks.ts and move the PR-merge/URL-parse group into…#391
jayminwest wants to merge 2 commits into
mainfrom
warren/run_etn8ndfywq3k

Conversation

@jayminwest

Copy link
Copy Markdown
Owner

Summary

refactor(runs): split PR-merge/URL-parse group into pr-checks.ts

Run

  • Warren run: run_etn8ndfywq3k
  • Agent: pi
  • Cost: $0.881 (54 in / 12.3k out / 792.7k cache-r)

Seeds

  • warren-db9a — Create src/runs/pr-checks.ts and move the PR-merge/URL-parse group into it. Move checkPullRequestMerged, mergePullRequest, parsePullRequestUrl, parsePullRequestRef, isRateLimited and their associated exported types/regexes (CheckPullRequestMergedInput, CheckPrMergedResult, MergePullRequestInput, MergePullRequestResult, PR_URL_RE, PR_SHORT_RE) out of src/runs/pr.ts into the new src/runs/pr-checks.ts, carrying any private helpers they need (buildHeaders/readJson/readText/truncate may need to be shared — if so, keep one copy and import it, do NOT duplicate, or jscpd check:dups will flag it). Re-export every moved PUBLIC symbol from src/runs/pr.ts (export { ... } from "./pr-checks.ts") so the path src/runs/pr.ts still resolves all of them. Verify: wc -l src/runs/pr.ts shows < 500 AND bun run typecheck is clean AND bun test src/runs/pr.test.ts is green with the same test count as before the split.

Commits (2)

  • 1ffe881 refactor(runs): split PR-merge/URL-parse group into pr-checks.ts
  • 4aaacbc chore(warren): seeds state

Files changed

.canopy/agent.json                                 |   1 +
 ...610Z_019ec5bf-8172-76ae-b749-53f2f5300bb2.jsonl |  55 ++++
 .seeds/issues.jsonl                                |   4 +-
 biome.json                                         |   1 +
 src/runs/pr-checks.ts                              | 331 ++++++++++++++++++++
 src/runs/pr.ts                                     | 344 ++-------------------
 6 files changed, 413 insertions(+), 323 deletions(-)

Prompt

Show prompt
work on sd warren-db9a

🤖 Opened by warren run run_etn8ndfywq3k

jayminwest and others added 2 commits June 14, 2026 10:52
Move checkPullRequestMerged, mergePullRequest, parsePullRequestUrl,
parsePullRequestRef, isRateLimited and their exported types/regexes out
of src/runs/pr.ts into a new src/runs/pr-checks.ts. Shared GitHub REST
helpers (buildHeaders/readJson/readText/truncate/readGhFetchOverride/
GITHUB_API_BASE/GH_FETCH_OVERRIDE_ENV) live in pr-checks.ts and are
imported by pr.ts (one copy, no duplication). pr.ts re-exports every
moved public symbol so the ../runs/pr.ts import path still resolves.

pr.ts drops from 659 to 361 lines. mergePullRequest's grandfathered
complexity override follows it to pr-checks.ts in biome.json.

Refs: warren-db9a (pl-88bb step 1)
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