feat(adapter-github): extract canonical GitHub REST operation builders + request types#25
Merged
khaliqgant merged 4 commits intomainfrom Apr 26, 2026
Merged
Conversation
…s + request types Tracks relayfile-adapters#24 — one canonical home for GitHub API knowledge so cloud route.ts, cloud apifallback, and sage nango-integrations syncs all consume the same operations instead of holding duplicate REST path builders. New exports under @relayfile/adapter-github: - Operation builders: listIssues, listPullRequests, listComments, listReleases - Repository helpers: getRepository, listOrgs, listRepos - Request/operation types: GitHubOperation, GitHubRepoRef, pagination and input interfaces Endpoint and query-parameter shapes are the UNION of what Nango, cloud, and sage consumers need. Validated against: 1. Nango integration-templates for GitHub (canonical baseline) 2. sage nango-integrations/github-sage/syncs/*.ts (production-proven) 3. cloud packages/web/app/api/v1/github/query/route.ts + apifallback (consumers) Live verification: Representative operations were sent through the real Nango proxy using sage NANGO_SECRET_KEY, with connection IDs dynamically discovered via nango.listConnections(). Operations returned non-error responses. Catches endpoint/scope drift at extract time so we never publish an operation builder that fails in production. Version: minor bump (additive — new exports, no breaking changes). Follow-up PRs (tracked in relayfile-adapters#24): - cloud refactor: import from @relayfile/adapter-github, drop local copies - sage refactor: same for nango-integrations/github-sage/syncs/* Co-Authored-By: Claude Opus 4.7 (1M context) <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
First of three extract PRs for relayfile-adapters#24. Adds canonical GitHub REST operation builders + request types under .
Bump:
@relayfile/adapter-githubminor → 0.2.0.What changed
packages/github/src/operations.tswith canonical REST operation builders for issues, pull requests, comments, releases, repository lookup, org listing, and repo listing.packages/github/src/index.ts.packages/github/src/operations.test.tscovering paths, query parameters, path encoding, pagination, and undefined-query omission.Sources
nango-integrations/github-sage/syncs/*.ts(production-proven shapes)packages/web/app/api/v1/github/query/route.ts+ apifallback (consumers being consolidated)Live verification
Representative operations in this PR were sent through the real Nango proxy using sage NANGO_SECRET_KEY, with the connection ID dynamically discovered via nango.listConnections(). Operations returned non-error responses. This catches endpoint/scope drift at extract time.
Follow-up PRs
After this PR merges and
@relayfile/adapter-github@0.2.0republishes:nango-integrations/github-sage/syncs/*Validation
npm test --workspace @relayfile/adapter-githubgreentsc -p packages/github/tsconfig.json --noEmitclean🤖 Generated with Claude Code