feat: add GitHub as a first-class data source#136
Open
zerone0x wants to merge 1 commit intomvanhorn:mainfrom
Open
feat: add GitHub as a first-class data source#136zerone0x wants to merge 1 commit intomvanhorn:mainfrom
zerone0x wants to merge 1 commit intomvanhorn:mainfrom
Conversation
Add GitHub Issues and PRs as a structured search source using the GitHub Search API. Works without auth (10 req/min) with optional GITHUB_TOKEN for higher rate limits (30 req/min). Implements the full 7-layer source pattern: - Source module (github.py): search, parse, comment enrichment - Schema: GitHubItem dataclass with engagement, labels, comments - Normalize: normalize_github_items() with date confidence - Score: engagement formula (0.45*reactions + 0.55*comments) - Dedupe: dedupe_github() wrapper - Orchestration: parallel execution with configurable timeouts - Render: compact, status, context, and full markdown output - Config: GITHUB_TOKEN env var, source tiering (tier2 for product/ concept/how_to/comparison queries) Includes 17 unit tests covering parsing, normalization, scoring, sorting, and serialization. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #134. Adds GitHub Issues and PRs as a structured search source using the GitHub Search API, following the existing 7-layer source pattern.
github.py): search viaapi.github.com/search/issues, parse responses, enrich top items with comment threadsGitHubItemdataclass with engagement metrics, labels, body snippets, and comment insightsGITHUB_TOKENenv var for higher rate limits (30 req/min vs 10 unauthenticated); always available as a sourceproduct,concept,how_to,comparisonquery typesDesign decisions
Test plan
tests/test_github.py)--search githubflagGITHUB_TOKENset for authenticated rate limits🤖 Generated with Claude Code