feat(rootly): expand Rootly integration from 14 to 27 tools#3902
feat(rootly): expand Rootly integration from 14 to 27 tools#3902waleedlatif1 merged 7 commits intostagingfrom
Conversation
Add 13 new tools: delete_incident, get_alert, update_alert, acknowledge_alert, resolve_alert, create_action_item, list_action_items, list_users, list_on_calls, list_schedules, list_escalation_policies, list_causes, list_playbooks. Includes tool files, types, registry, block definition with subBlocks/conditions/params, and docs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Updates the Rootly block UI/config to expose these operations and map their inputs, registers the new tool implementations in the tool registry, and extends Rootly types and docs (including enriching alert outputs with Written by Cursor Bugbot for commit 28c37be. Configure here. |
Greptile SummaryThis PR expands the Rootly integration from 14 to 27 tools, adding 13 new API operations covering the full alert lifecycle (get/update/acknowledge/resolve), action item CRUD, and catalog list endpoints (users, on-calls, schedules, escalation policies, causes, playbooks). All new tools follow the established JSON:API patterns and the previously flagged issues (204 response on DELETE, bodyless POST, Key changes:
Minor findings:
Confidence Score: 5/5Safe to merge — all previously flagged P0/P1 issues have been resolved and no new blocking issues were found All critical issues from prior review rounds are addressed: the 204-body crash in delete_incident, the bodyless POST in acknowledge_alert, the NaN coercion in create_action_item, and the JSON:API relationship mis-read in list_on_calls are all correctly fixed. The two remaining findings are minor P2 style/performance suggestions (missing pagination on list_on_calls, and an O(n²) included-lookup) that do not affect correctness. apps/sim/tools/rootly/list_on_calls.ts — missing pagination params and O(n²) included lookup Important Files Changed
Sequence DiagramsequenceDiagram
participant Block as RootlyBlock
participant Executor as Executor
participant API as Rootly API
Note over Block,API: Alert Lifecycle
Block->>Executor: rootly_create_alert { summary, source, ... }
Executor->>API: POST /v1/alerts
API-->>Executor: 201 { data: { id, attributes } }
Executor-->>Block: { alert: { id, status: "triggered", ... } }
Block->>Executor: rootly_acknowledge_alert { alertId }
Executor->>API: POST /v1/alerts/{id}/acknowledge { data: {} }
API-->>Executor: 200 { data: { attributes.status: "acknowledged" } }
Executor-->>Block: { alert: { status: "acknowledged" } }
Block->>Executor: rootly_resolve_alert { alertId, resolutionMessage }
Executor->>API: POST /v1/alerts/{id}/resolve { data: { type, attributes } }
API-->>Executor: 200 { data: { attributes.status: "resolved" } }
Executor-->>Block: { alert: { status: "resolved" } }
Note over Block,API: Incident Action Items
Block->>Executor: rootly_create_action_item { incidentId, summary }
Executor->>API: POST /v1/incidents/{id}/action_items
API-->>Executor: 201 { data: { id, attributes } }
Executor-->>Block: { actionItem: { id, status: "open" } }
Note over Block,API: On-Call Resolution (with JSON:API includes)
Block->>Executor: rootly_list_on_calls { scheduleIds }
Executor->>API: GET /v1/oncalls?filter[schedule_ids]=...&include=user,schedule,escalation_policy
API-->>Executor: 200 { data: [...], included: [users, schedules] }
Executor-->>Block: { onCalls: [{ userId, userName, scheduleId, scheduleName }] }
Note over Block,API: Incident Deletion
Block->>Executor: rootly_delete_incident { incidentId }
Executor->>API: DELETE /v1/incidents/{id}
API-->>Executor: 204 No Content
Executor-->>Block: { success: true, message: "Incident deleted successfully" }
Reviews (4): Last reviewed commit: "fix(rootly): extract on-call relationshi..." | Re-trigger Greptile |
DELETE /v1/incidents/{id} returns 204 with empty body. Avoid calling
response.json() on success — return success/message instead.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…_alert Remove all inline section comments from block definition per CLAUDE.md guidelines. Add explicit empty JSON:API body to acknowledge_alert POST to prevent potential 400 from servers expecting a body with Content-Type. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@greptile |
|
@cursor review |
… parse
resolve_alert now sends { data: {} } instead of undefined when no
optional params are provided, matching the acknowledge_alert fix.
create_action_item now validates assignedToUserId is numeric before
parseInt to avoid silent NaN coercion.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@greptile |
|
@cursor review |
…s/included On-call user, schedule, and escalation policy are exposed as JSON:API relationships, not flat attributes. Now extracts IDs from item.relationships and looks up names from the included array. Adds ?include=user,schedule,escalation_policy to the request URL. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@greptile |
|
@cursor review |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
New Tools
/v1/incidents/{id}/v1/alerts/{id}/v1/alerts/{id}/v1/alerts/{id}/acknowledge/v1/alerts/{id}/resolve/v1/incidents/{id}/action_items/v1/incidents/{id}/action_items/v1/users/v1/oncalls/v1/schedules/v1/escalation_policies/v1/causes/v1/playbooksTest plan