Skip to content

feat: batch GitHub Search API with OR semantics for labels and repos#66

Merged
cdhagmann merged 2 commits into
mainfrom
search-api-or-labels
May 18, 2026
Merged

feat: batch GitHub Search API with OR semantics for labels and repos#66
cdhagmann merged 2 commits into
mainfrom
search-api-or-labels

Conversation

@cdhagmann

Copy link
Copy Markdown
Owner

Summary

  • Replaces per-project per-label Issues API calls with a single batched GitHub Search API request per 10 repos
  • Search query uses OR semantics: is:issue state:open (label:"A" OR label:"B") repo:o/r1 repo:o/r2 …
  • Reduces N×labels network round trips to ceil(N/10) calls for both scan and issues all
  • Results are cached by the full query string; same-lockfile repeat scans still hit cache

Linked issue / ADR

Closes #52 (reduces API call count to avoid rate limiting).

Working agreement

  • No new architectural boundaries crossed — adapter change stays inside GitHubAdapter
  • Specs updated for all three affected files (github_adapter_spec, scan_spec, issues_spec)
  • bin/rubocop clean
  • bundle exec rspec — 246 examples, 0 failures

Test plan

  • #issues_matching_labels unit tests: hash return format, empty-inputs short-circuit, batching (11 repos → 2 requests), caching (same call → 1 request), OR query structure
  • scan_spec fully rewritten to mock issues_matching_labels returning a hash
  • issues_spec fully rewritten; batch-level failure test replaces per-gem failure test

🤖 Generated with Claude Code

Chris Hagmann and others added 2 commits May 7, 2026 12:41
Replaces per-project per-label Issues API calls with a single batched
Search API request per 10 repos, using `(label:"A" OR label:"B")
repo:o/r1 repo:o/r2` query syntax. Reduces N×labels network round
trips to ceil(N/10) calls for both `scan` and `issues all`.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@cdhagmann cdhagmann merged commit 1d9f706 into main May 18, 2026
2 checks passed
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