CI/CD Integration
Auto-Detection
Threadline automatically detects CI environments and adjusts behavior:
- Branch detected: Reviews all commits in branch vs base (cumulative)
- Commit SHA detected: Reviews the specific commit
- Local development: Reviews staged/unstaged changes
No configuration needed - just run threadlines check.
GitHub Actions
- name: Run Threadline checks
run: npx threadlines check
env:
THREADLINE_ACCOUNT: ${{ secrets.THREADLINE_ACCOUNT }}
THREADLINE_API_KEY: ${{ secrets.THREADLINE_API_KEY }}
THREADLINE_API_URL: ${{ secrets.THREADLINE_API_URL }}Threadline auto-detects GITHUB_REF_NAME (branch) or GITHUB_SHA (commit).
GitLab CI
threadline_check:
script:
- npx threadlines check
variables:
THREADLINE_ACCOUNT: $THREADLINE_ACCOUNT
THREADLINE_API_KEY: $THREADLINE_API_KEY
THREADLINE_API_URL: $THREADLINE_API_URLThreadline auto-detects CI_COMMIT_REF_NAME (branch) or CI_COMMIT_SHA (commit).
Vercel
Add to your build command or vercel.json:
{
"buildCommand": "npx threadlines check && npm run build"
}Threadline auto-detects VERCEL_GIT_COMMIT_REF (branch) or VERCEL_GIT_COMMIT_SHA (commit).
Required Environment Variables
THREADLINE_ACCOUNT- Your account identifier (email, company name, etc.)THREADLINE_API_KEY- Your API key for authenticationTHREADLINE_API_URL- Server URL (if not using default)
Set these as secrets/environment variables in your CI/CD platform.