| name | linear-update |
| description | Update Linear issues with debugging findings. Add comments, change status, update labels, set priority. Use after completing investigations. |
Update Linear Issue
Update Linear issues with debugging findings, status changes, and investigation notes.
When to Use
- Adding debugging findings as comments
- Updating issue status after investigation
- Adding labels for categorization
- Changing priority based on severity
- Recording root cause analysis
Pre-flight Checks
Authentication
linearis --version 2>/dev/null || {
echo "linearis CLI not installed"
exit 1
}
linearis issues list --limit 1 >/dev/null 2>&1 || {
echo "Not authenticated to Linear"
exit 1
}
Common Commands
1. Add Comment
linearis comments create ENG-1234 --body "Root cause identified: database connection pool exhausted"
linearis comments create ENG-1234 --body "$(cat <<'EOF'
## Investigation Findings
**Root Cause**: Database connection pool exhausted
**Evidence**:
- GCP logs show "connection refused" errors starting at 10:30 UTC
- Kubernetes events show 1/3 pods in CrashLoopBackOff
- Pod describe shows max_connections reached
**Timeline**:
- 10:28 UTC: Traffic spike to 3x normal
- 10:30 UTC: First connection errors
- 10:32 UTC: Pod restarts begin
**Recommendation**: Increase database connection pool limit from 100 to 250
EOF
)"
2. Update Issue Status
linearis issues update ENG-1234 --state "In Progress"
linearis issues update ENG-1234 --state "Done"
3. Update Priority
linearis issues update ENG-1234 --priority 1
linearis issues update ENG-1234 --priority 4
4. Add Labels
linearis issues update ENG-1234 --labels "bug,production,database"
linearis issues update ENG-1234 --labels "investigating" --label-by adding
linearis issues update ENG-1234 --labels "resolved,production" --label-by overwriting
linearis issues update ENG-1234 --clear-labels
5. Update Multiple Fields
linearis issues update ENG-1234 \
--state "In Progress" \
--priority 2 \
--labels "investigating,production"
linearis comments create ENG-1234 --body "Started investigation - checking GCP logs and K8s events"
6. Update Title or Description
linearis issues update ENG-1234 --title "API Gateway connection pool exhaustion in production"
linearis issues update ENG-1234 --description "$(cat <<'EOF'
Production issue: API gateway pods crashing due to database connection pool exhaustion.
Impact: 30% of requests failing
Started: 2025-12-24 10:28 UTC
Environment: production (example-production project)
EOF
)"
Output Management
Log updates for audit trail:
linearis comments create ENG-1234 --body "Investigation complete" | tee -a /tmp/linear-updates-$(date +%Y%m%d).log
echo "[$(date)] Updated ENG-1234 to 'Done'" >> /tmp/linear-updates.log
linearis issues update ENG-1234 --state "Done"
Workflow Pattern
Complete debugging → Linear update workflow:
linearis issues read ENG-1234 > /tmp/issue-ENG-1234.json
linearis comments create ENG-1234 --body "$(cat <<'EOF'
## Root Cause Analysis
Found database connection pool exhaustion.
See attached logs:
- GCP logs: /tmp/gcp-errors-20251224.json
- K8s events: /tmp/k8s-events-20251224.txt
EOF
)"
linearis issues update ENG-1234 \
--state "In Progress" \
--labels "root-cause-identified"
linearis comments create ENG-1234 --body "Fix deployed, monitoring for 24h"
linearis issues update ENG-1234 --state "Done"
Tips
- Use heredoc for multi-line comments with formatting
- Include timestamps in comments for timeline clarity
- Reference log files saved to /tmp in comments
- Update status incrementally (Backlog → In Progress → Done)
- Add labels for categorization and filtering
- Priority 1 (Urgent) should be reserved for production incidents
- Use
--body with heredoc to preserve markdown formatting in comments
- Save comment text to /tmp first if very long, then reference file