Configure Linear integrations across development, staging, and production environments with proper secret management and environment guards.
Create typed config with per-environment API keys, webhook secrets, team keys, and feature flags (e.g., disable webhooks in dev, enable debug in staging).
Use Vault, AWS Secrets Manager, or GCP Secret Manager to store API keys securely. Fetch secrets at runtime in production.
Singleton client that auto-configures based on NODE_ENV with test injection support.
requireProduction() for prod-only operationspreventProduction() for dangerous dev operationssafeDeleteIssue() that archives in prod, deletes in devDev uses polling (localhost), staging uses full event set, production adds Label events.
GitHub Actions with environment-scoped secrets for staging (main branch) and production (release branches).
See detailed implementation for full code examples including secret manager integrations and CI/CD workflows.
| Error | Cause | Solution |
|---|---|---|
| Wrong environment | API key mismatch | Verify secrets for correct env |
| Secret not found | Missing secret | Add secret to secret manager |
| Team not found | Wrong workspace | Check defaultTeamKey setting |
| Permission denied | Insufficient scope | Regenerate API key |
NODE_ENV=staging npx ts-node scripts/validate-environment.ts
# Output: API Key: Valid, Default Team: Found, Webhook Secret: Set
Set up observability with linear-observability.