GitHub Integration
GitHub access uses the shared provider API runtime and the Analytics GitHub
OAuth connection. Do not add a separate GitHub client or /api/github/*
pass-through routes.
Access Paths
- Use
github-repo-filesfor repository file discovery, bounded text search, and file reads. It is the stable, agent-friendly wrapper around the shared core implementation. - Use
provider-api-catalog,provider-api-docs, andprovider-api-requestwith providergithubfor pull requests, issues, searches, and GraphQL operations not modeled bygithub-repo-files. - For broad or paginated analysis, stage the provider response and reduce it
with
query-staged-datasetorrun-codeinstead of returning a large corpus to chat.
Authentication remains owned by server/lib/github-oauth.ts; provider calls
must resolve the current viewer's OAuth grant or scoped credential through the
shared runtime.
Key Patterns & Gotchas
GitHub search qualifiers
org:<org>— all repos in orgrepo:<org>/<repo>— specific repois:pr is:open/is:pr is:merged/is:pr is:closedis:issue is:open/is:issue is:closedauthor:username— PRs/issues by authorassignee:username— assigned to userlabel:bug— by labelin:title keyword— keyword in titlecreated:>2025-01-01— date rangereview:approved— approved PRsreview:changes_requested
Use provider documentation to confirm endpoint, version, pagination, and search behavior before making absence claims. Report the repository or organization, filters, page coverage, and any truncation with the answer.