feat: Add ActionItem model and sync service for Linear#193
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 41d1d53. Configure here.
| logger.error(error_msg) | ||
| stats.errors.append(error_msg) | ||
| incident.action_items_last_synced_at = timezone.now() | ||
| incident.save(update_fields=["action_items_last_synced_at"]) |
There was a problem hiding this comment.
Failed API calls incorrectly update last-synced timestamp
Medium Severity
When the Linear API fails to fetch child or related issues, the code sets action_items_last_synced_at to timezone.now(). This causes the throttle check to treat it as a successful sync, blocking non-forced retries for the full throttle period (default 300s) even though no data was actually synced. The existing sync_incident_participants_from_slack function intentionally does not update the timestamp on API failure, allowing immediate retries. This inconsistency means transient Linear API errors will suppress webhook-triggered syncs for several minutes.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 41d1d53. Configure here.


Adds the ActionItem model, migration, sync service, serializers, and admin for syncing action items from Linear parent issues. Includes throttling, assignee resolution, parent issue status updates, and deduplication across children and relations.
Split from the linear-action-items branch (PR 2 of 4). Hooks, views, and API endpoints coming in follow-up PRs.