CI/CD Integration
Threadline automatically detects CI environments and uses platform-specific environment variables to determine context. No configuration needed - just run npx --yes threadlines check --debug.
CI Platform Setup
GitHub Actions: npx --yes threadlines check --debug
Variables: GITHUB_EVENT_NAME, GITHUB_BASE_REF, GITHUB_REF_NAME, GITHUB_SHA
GitLab CI: npx --yes threadlines check --debug
Variables: CI_MERGE_REQUEST_IID, CI_MERGE_REQUEST_TARGET_BRANCH_NAME, CI_COMMIT_REF_NAME, CI_COMMIT_SHA
Bitbucket Pipelines: npx --yes threadlines check --debug
Variables: BITBUCKET_PR_ID, BITBUCKET_PR_DESTINATION_BRANCH, BITBUCKET_BRANCH, BITBUCKET_COMMIT
Vercel: npx --yes threadlines check --debug
Variables: VERCEL_GIT_COMMIT_REF, VERCEL_GIT_COMMIT_SHA
Required Environment Variables
THREADLINE_ACCOUNT- Your account identifier (email)THREADLINE_API_KEY- Your API key for authentication
Set these as secrets/environment variables in your CI/CD platform. Get your credentials at devthreadline.com/settings.
To customize the API URL, create a .threadlinerc file in your project root (see Configuration documentation).
CLI Flags
Required in CI/CD
--yesor-y- Auto-confirms package installation (prevents prompts that block automation)
Recommended in CI/CD
--debug- Enable verbose debug logging for troubleshooting--full- Show all results (compliant, attention, not_relevant) instead of only attention items
Ignored in CI/CD
These flags are for local development only and are ignored in CI environments with a warning:
--commit- CI uses auto-detected commit context--file,--folder,--files- CI uses auto-detected diff context
Review Context Types
Threadline assigns a review context type to each check, visible in the dashboard:
pr- Pull Request/Merge Request (auto-detected in CI)commit- Specific commit (auto-detected in CI push, or--commitflag locally)local- Staged/unstaged changes (default for local development)file- Single file (--fileflag, local only)folder- Folder contents (--folderflag, local only)files- Multiple files (--filesflag, local only)