Linear Webhook¶
Route & Auth¶
| Property | Value |
|---|---|
| Method | POST |
| Path | /webhooks/linear |
| Auth type | sha256_raw |
| Header | Linear-Signature |
| Secret | LINEAR_WEBHOOK_SECRET |
| Service account | linear-webhook@alan-eu-tools.iam.gserviceaccount.com |
| Response | 204 No Content |
Payload¶
| Field | Type | Description |
|---|---|---|
action |
string |
Event action (create, update, remove) |
type |
string |
Entity type (Issue or Comment) |
data |
dict |
Issue or comment details (id, title, state, labels, team, etc.) |
actor |
dict |
User who triggered the event |
updatedFrom |
dict? |
Previous values for changed fields |
The payload is parsed into a LinearEvent dataclass before dispatch.
Handlers¶
Events are dispatched through an ordered handler registry. Each handler implements handle(event) and decides independently whether to act.
1. IntercomNoteHandler¶
Posts notes to Intercom when Linear comments contain @care or @tessi, or when issues with Intercom links are created/completed.
Integrations: Linear API, Intercom API
2. IssueSLAHandler¶
Sets SLA deadlines on oncall issues based on team and source-type configuration.
Integrations: Linear API
3. IssueAssignmentHandler¶
Auto-assigns unassigned oncall issues to the current oncall engineer when created or when state changes to the opened status. Skips issues that already have an assignee.
Integrations: Linear API, oncall group DB
4. EngOncallAssignerHandler¶
ML-based auto-assignment for the Eng Oncall Triage team. Calls a SageMaker endpoint (eng-oncall-assigner-v4) to predict the target team and moves the issue there.
Integrations: Linear API, AWS SageMaker
5. EngOncallRemindersHandler¶
Posts reminder comments on completed "Eng Oncall" issues missing action-type, time-to-solve, or parent-issue labels.
Integrations: Linear API
6. CareOncallRemindersHandler¶
Posts reminder comments on completed Care Oncall issues missing source/job/spe labels, and reopens the issue to "Todo" state.
Integrations: Linear API
Code reference¶
{{ package_reference("apps.eu_tools.webhooks.linear.webhook") }}
{{ package_reference("apps.eu_tools.webhooks.linear.handlers.intercom_note") }}
{{ package_reference("apps.eu_tools.webhooks.linear.handlers.issue_sla") }}
{{ package_reference("apps.eu_tools.webhooks.linear.handlers.issue_assignment") }}
{{ package_reference("apps.eu_tools.webhooks.linear.handlers.eng_oncall_assigner") }}
{{ package_reference("apps.eu_tools.webhooks.linear.handlers.eng_oncall_reminders") }}
{{ package_reference("apps.eu_tools.webhooks.linear.handlers.care_oncall_reminders") }}