Overview
The GitHub integration imports your repositories, issues, and pull requests as searchable Trix memories. Content is converted to markdown and synchronized incrementally.
- Repository Sync - Import repository metadata, descriptions, and README files
- Issue Sync - Import issues with labels, state, and comments
- Pull Request Sync - Import PRs with branch info and review status
- File Content - Retrieve individual file contents from repositories
- Incremental Updates - Only sync changed content
Connecting GitHub
Via CLI (Recommended)
trix integrations connect githubThis opens your browser for OAuth authorization. Grant Trix access to your GitHub repositories.
Via API
# Initiate OAuth flow
curl -X POST https://api.trixdb.com/v1/integrations/oauth/initiate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"provider": "github"}'GitHub OAuth requires the repo, read:user, and read:org scopes
for full access to repositories and organizations.
What Gets Synced
Repositories
Each GitHub repository becomes a memory with:
| Memory Field | Source |
|---|---|
content | Repository name, description, and stats |
content_type | markdown |
metadata.source | github |
metadata.github_url | Repository URL |
metadata.language | Primary programming language |
metadata.stars | Star count |
tags | ["github", "repository"] |
Issues
Each GitHub issue becomes a memory with:
| Memory Field | Source |
|---|---|
content | Issue title and body as markdown |
metadata.issue_number | Issue number (e.g., #42) |
metadata.state | open or closed |
metadata.labels | Array of label names |
metadata.author | GitHub username |
tags | ["github", "issue", "open"] |
Pull Requests
Each GitHub pull request becomes a memory with:
| Memory Field | Source |
|---|---|
content | PR title and description as markdown |
metadata.pr_number | PR number |
metadata.state | open, closed, or merged |
metadata.head_branch | Source branch name |
metadata.base_branch | Target branch name |
tags | ["github", "pull-request"] |
Resource Types
| Type | Description |
|---|---|
github_repository | Repository metadata, description, README |
github_issue | Issues with labels, state, assignees |
github_pull_request | PRs with branch info, review status |
github_file | Individual file content from repositories |
Syncing Content
# List connections
trix integrations list
# Sync all repositories
trix integrations sync conn_abc123
# Sync specific repository with issues
trix integrations sync conn_abc123 --repo owner/repo --include issues,prs
# Full sync (re-import everything)
trix integrations sync conn_abc123 --full
# Check status
trix integrations status conn_abc123API Reference
# List connections
curl -X GET https://api.trixdb.com/v1/integrations/connections \
-H "Authorization: Bearer YOUR_API_KEY"
# Trigger sync
curl -X POST https://api.trixdb.com/v1/integrations/connections/{id}/sync \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"job_type": "incremental"}'
# Sync specific repository
curl -X POST https://api.trixdb.com/v1/integrations/connections/{id}/sync \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"repository": "owner/repo", "resource_types": ["github_issue", "github_pull_request"]}'
# Disconnect
curl -X DELETE https://api.trixdb.com/v1/integrations/connections/{id} \
-H "Authorization: Bearer YOUR_API_KEY"Rate Limits
GitHub has generous API rate limits. Trix handles this automatically:
- 5,000 requests/hour for authenticated requests
- 30 requests/minute conservative limit used by Trix
- Automatic retry with exponential backoff on rate limit errors
- Sync jobs queue and process sequentially
GitHub's rate limit is per-user. If you hit limits, wait for the reset time shown in the error message.
Required Permissions
The GitHub OAuth app requests these scopes:
| Scope | Purpose |
|---|---|
repo | Full access to private and public repositories |
read:user | Read user profile information |
read:org | Read organization membership |
Troubleshooting
Repositories Not Appearing
- Check that you've authorized the correct GitHub account
- Verify the OAuth app has access to the organization's repositories
- For organization repos, an org admin may need to approve the OAuth app
Private Repositories
Private repositories require the repo scope. If you only see public repos,
reconnect and ensure you grant full repository access.
Reconnecting
trix integrations disconnect conn_abc123
trix integrations connect githubGitHub OAuth tokens don't expire, but you can revoke access at any time from GitHub Settings → Applications → Authorized OAuth Apps.