Linear Integration
Connect your Linear workspace to Tembo for automated issue management and AI-powered solutions
The Linear integration allows Tembo to automatically detect and solve issues from your Linear workspace. Once connected, Tembo can respond to issue assignments and label changes to provide AI-powered code solutions.
Features
- Automatic Issue Detection: Tembo monitors your Linear workspace for new issues and updates
- AI-Powered Solutions: When issues are assigned to Tembo or labeled with “tembo”, the AI agent analyzes the issue and provides code solutions
- Repository Linking: Connect specific Linear issues to GitHub repositories for targeted solutions
- Webhook Support: Real-time updates through Linear webhooks for immediate response
- Credit Management: Integrated billing system to manage AI solution credits
Setup
1. OAuth Configuration
The Linear integration uses OAuth 2.0 for secure authentication. Configure the following environment variables:
2. OAuth Scopes
The integration requires the following Linear API scopes:
read
- Read access to workspace datawrite
- Write access for creating comments and updating issuesapp:assignable
- Allows the app to be assigned to issuesapp:mentionable
- Allows the app to be mentioned in comments
3. Webhook Configuration
Configure Linear webhooks to send notifications to:
Required webhook events:
- Issue updates (label changes, assignments)
- OAuth app revocation
Usage
Issue Assignment Method
- Assign any Linear issue to the Tembo app
- Tembo will automatically:
- Create a comment confirming the assignment
- Queue the issue for AI analysis (if credits available)
- Update the issue status to “In Progress” when solving begins
Label Method
- Add the “tembo” label to any Linear issue
- Tembo will automatically:
- Create a comment acknowledging the label
- Queue the issue for AI analysis (if credits available)
Repository Linking
- Connect GitHub repositories during setup
- Linear labels are automatically created for each repository
- Add a repository label to an issue to link it to that specific codebase
- Tembo will focus solutions on the linked repository
Issue Processing
Issue States
Tembo syncs with the following Linear workflow states:
- All non-completed and non-canceled states are monitored
- Issues in “completed” or “canceled” states are skipped
Priority Mapping
Linear priorities are mapped to Tembo severity levels:
Linear Priority | Tembo Level | Description |
---|---|---|
Urgent (1) | 5 (Critical) | Highest priority |
High (2) | 4 (High) | High priority |
Normal (3) | 3 (Medium) | Standard priority |
Low (4) | 2 (Low) | Lower priority |
No Priority (0) | 2 (Low) | Default level |
Data Structure
Issues are stored with the following structure:
Automatic Labels
System Labels
Tembo automatically creates the following labels in your Linear workspace:
- “Tembo” - Used to trigger AI solutions (alternative to assignment)
- “Tembo Git Repositories” - Parent group for repository labels
Repository Labels
For each connected GitHub repository, Tembo creates:
- A child label under “Tembo Git Repositories”
- Named after the repository
- Linked to the specific codebase for targeted solutions
API Endpoints
Feature Requests
Create feature requests directly in Linear:
Webhook Events
Issue Updates
Triggered when:
- Labels are added/removed (especially “tembo” label)
- Repository labels are added
- Issue assignments change
Issue Assignments
Triggered when:
- Issues are assigned to the Tembo app
- Automatic comment creation and queuing
OAuth Revocation
Triggered when:
- OAuth access is revoked
- Automatic cleanup of integration data
Comments and Notifications
Tembo automatically creates comments in Linear for:
Assignment/Label Comments
Repository Link Comments
Insufficient Credits
Integration Management
Sync Process
The integration periodically syncs:
- Workflow states → Issue sources
- Labels → Issue sources
- Repository connections → Label relationships
Credit System
- Each AI solution consumes credits
- Credit balance is checked before queuing issues
- Users are notified when credits are insufficient
Troubleshooting
Common Issues
-
Webhook not receiving events
- Verify webhook URL is accessible
- Check webhook secret configuration
- Ensure required events are enabled
-
OAuth authentication failures
- Verify client ID and secret
- Check redirect URI configuration
- Ensure required scopes are granted
-
Issues not being processed
- Verify “tembo” label exists
- Check credit balance
- Review issue assignment to Tembo app
-
Repository labels not working
- Ensure GitHub integration is connected
- Verify repository permissions
- Check label creation in Linear workspace
Debug Information
The integration logs detailed information for troubleshooting:
- Webhook payload processing
- Issue upsert operations
- Credit balance checks
- Label and assignment handling
For additional support, check the application logs for detailed error messages and processing status.