Repository Management
Connect GitHub or GitLab repositories so the bot can browse code, edit dbt models, and open pull requests on your behalf.
Connecting a Repository
- Go to Admin → Repositories
- Click Add Repository
- Choose the provider (GitHub or GitLab)
- Authenticate via OAuth or paste a personal access token
- Select the repository from the list
- Set the type:
dbt,docs, orcustom - Enable read and/or write access
Authentication Methods
GitHub OAuth
Requires a GitHub OAuth app registered in your organization. Set GITHUB_CLIENT_ID andGITHUB_CLIENT_SECRET in .env. The redirect URI should be:
https://your-domain.com/admin/api/repositories/oauth/github/callback
GitLab OAuth
Register an application in GitLab (Settings → Applications). Set GITLAB_CLIENT_ID andGITLAB_CLIENT_SECRET in .env. For self-managed GitLab, also set GITLAB_BASE_URL.
Personal Access Token
For GitLab, you can alternatively use a PAT. Click Connect with Token in the repositories page and paste the token. Note that PATs can expire.
Repository Types
| Type | Purpose |
|---|---|
dbt | dbt project — used by dbt tools for model editing |
docs | Documentation repository |
custom | Generic code repository |
Read vs Write Access
- Read-enabled — the bot can browse files and understand your codebase
- Write-enabled — the bot can create branches, commit changes, and open PRs
For dbt model editing, at least one repository must be write-enabled.
How It Works
- Each user gets a separate working directory (git clone) to prevent conflicts
- The working directory auto-syncs (git pull) when accessed
- OAuth tokens are encrypted in the database using
REPO_ENCRYPTION_KEY - Inactive working directories are automatically cleaned up
Important Notes
- Set
REPO_ENCRYPTION_KEYin.env— without it, OAuth tokens are lost on restart - GitHub OAuth requests full
reposcope for read and write access - All users share the same instance-wide OAuth connection