Skip to content

feat(rootly): add Rootly incident management integration with 14 tools#3899

Merged
waleedlatif1 merged 8 commits intostagingfrom
waleedlatif1/add-rootly-integration
Apr 2, 2026
Merged

feat(rootly): add Rootly incident management integration with 14 tools#3899
waleedlatif1 merged 8 commits intostagingfrom
waleedlatif1/add-rootly-integration

Conversation

@waleedlatif1
Copy link
Copy Markdown
Collaborator

Summary

  • Added full Rootly incident management integration with 14 tools
  • Tools: create/update/get/list incidents, create/list alerts, list services, list severities, list retrospectives, list teams, list environments, list incident types, list functionalities
  • Block with operation dropdown, conditional subBlocks, API key auth, advanced mode for optional fields

Type of Change

  • New feature

Testing

Tested manually

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@cursor
Copy link
Copy Markdown

cursor bot commented Apr 2, 2026

PR Summary

Medium Risk
Adds a new third-party API integration with multiple new HTTP tools and parameter mapping, which can impact request/response handling and user-provided API key usage. Risk is mitigated by being largely additive, but correctness depends on Rootly API contract and error handling.

Overview
Adds a new Rootly integration end-to-end: a RootlyBlock with an operation dropdown and conditional inputs, plus 14 new rootly_* tools wired into the Sim tool registry for creating/updating/getting/listing incidents, creating/listing alerts, and listing related catalog data (services, severities, teams, environments, incident types, functionalities, retrospectives).

Updates the landing integrations metadata (integrations.json) and both apps’ icon mappings/icons to include RootlyIcon, and adds new docs content at tools/rootly.mdx (with meta.json entry). Also fixes minor Rippling copy (“a object” → “an object”) in docs/metadata.

Written by Cursor Bugbot for commit 9f6b8ea. Configure here.

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Apr 2, 2026 6:29pm

Request Review

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 2, 2026

Greptile Summary

This PR adds a full Rootly incident management integration with 14 tools, following the established Sim integration pattern (tools → block → icon). It covers the complete CRUD lifecycle for incidents, alert creation and listing, timeline events, and seven catalog-style list operations (services, severities, teams, environments, incident types, functionalities, retrospectives).

Key highlights:

  • All 14 tools correctly use visibility: 'user-only' for the apiKey param, satisfying the credential visibility rule.
  • All list tools now correctly surface data.meta?.total_count ?? items.length for totalCount (per the fix from prior review).
  • The block tools.config.params function handles all type coercions (e.g., string dropdown 'true'/'false' → boolean private; string page params → Number()) correctly in params, not in tool, avoiding the known serialization pitfall.
  • The updateEnvironmentIds subBlock, inputs entry, and params mapping are present.
  • The RootlyResponse union type in types.ts correctly covers all tool response shapes.
  • Block inputs section is complete — every subBlock id has a corresponding entry.
  • No console.log usage; no relative imports; no any types.

Confidence Score: 5/5

Integration is well-structured and complete — safe to merge pending resolution of any outstanding items from prior review rounds.

No new P0 or P1 findings identified in this pass. All 14 tools follow the established ToolConfig pattern, API key visibility is correctly set to user-only across every tool, list tool totalCount fields use the API meta field with a correct fallback, all block subBlock/inputs/outputs/params mappings are consistent, and no custom rules are violated.

apps/sim/tools/rootly/update_incident.ts — verify the HTTP method is correct per the Rootly API spec.

Important Files Changed

Filename Overview
apps/sim/tools/rootly/update_incident.ts Partial-update tool for incidents; uses method: 'PUT' (line 122) despite the prior-review fix claim — the Rootly API specifies PATCH for partial updates. Otherwise the body, params, and transformResponse are well-structured.
apps/sim/blocks/blocks/rootly.ts 1155-line block definition covering all 14 operations; subBlocks, conditions, inputs, outputs, and tool param mappings are all consistent and complete after prior-review fixes.
apps/sim/tools/rootly/create_incident.ts Creates incidents via POST /v1/incidents; correctly guards optional fields, splits comma-separated IDs, and parses JSON labels with a safe fallback.
apps/sim/tools/rootly/list_incidents.ts Lists incidents with full filter/sort/pagination support; totalCount now correctly uses data.meta?.total_count ?? incidents.length.
apps/sim/tools/rootly/create_alert.ts Creates alerts with required summary and source fields; optional fields are correctly guarded; response mapping is clean.
apps/sim/tools/rootly/add_incident_event.ts Adds timeline events to incidents via POST /v1/incidents/:id/events; minimal and correct, with proper required/optional field handling.
apps/sim/tools/rootly/types.ts Comprehensive type definitions for all 14 tool params and responses; correctly uses optional fields and a union RootlyResponse type for the block.
apps/sim/tools/rootly/index.ts Barrel export for all 14 Rootly tools; correctly lists all tool exports.
apps/sim/tools/registry.ts All 14 Rootly tools registered; placed after rippling_* entries, consistent with alphabetical grouping of this PR's additions.

Sequence Diagram

sequenceDiagram
    participant UI as Block UI
    participant Block as RootlyBlock (config)
    participant Tool as Rootly Tool
    participant API as api.rootly.com

    UI->>Block: operation selected + params filled
    Block->>Block: tools.config.tool() → resolves tool ID
    Block->>Block: tools.config.params() → maps subBlock fields,<br/>coerces types (string→bool, string→number)
    Block->>Tool: dispatches to selected ToolConfig

    alt Create / Update Incident
        Tool->>API: POST /v1/incidents (JSON:API)<br/>PATCH /v1/incidents/:id (JSON:API)
        API-->>Tool: { data: { id, attributes } }
        Tool-->>UI: { incident: RootlyIncidentData }
    end

    alt List Operations (incidents, alerts, services…)
        Tool->>API: GET /v1/{resource}?filter[…]&page[size]=…
        API-->>Tool: { data: [...], meta: { total_count } }
        Tool-->>UI: { items[], totalCount: meta.total_count ?? items.length }
    end

    alt Create Alert
        Tool->>API: POST /v1/alerts (JSON:API)
        API-->>Tool: { data: { id, attributes } }
        Tool-->>UI: { alert: RootlyAlertData }
    end

    alt Add Incident Event
        Tool->>API: POST /v1/incidents/:id/events (JSON:API)
        API-->>Tool: { data: { id, attributes } }
        Tool-->>UI: { eventId, event, visibility, occurredAt }
    end
Loading

Reviews (5): Last reviewed commit: "reorg" | Re-trigger Greptile

…nvironmentIds

- Changed update_incident HTTP method from PUT to PATCH per Rootly API spec
- Fixed totalCount in all 9 list tools to use data.meta?.total_count from API response
- Added missing updateEnvironmentIds subBlock and params mapping for update_incident
@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@cursor review

…us dropdown

- Include incident id in JSON:API PATCH body per spec requirement
- Add 'Unchanged' empty option to updateStatus dropdown to avoid accidental overwrites
@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@cursor review

… gaps

- Add missing get_incident output fields (private, shortUrl, closedAt)
- Add missing block subBlocks: createPrivate, alertStatus, alertExternalId, listAlertsServices
- Add pageNumber subBlocks for all 9 list operations
- Add teams/environments filter subBlocks for list_incidents and list_alerts
- Add environmentIds subBlock for create_alert
- Add empty default options to all optional dropdowns (createStatus, createKind, listIncidentsSort, eventVisibility)
- Wire all new subBlocks in tools.config.params and inputs
- Regenerate docs
@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@cursor review

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

- list_incident_types: use filter[name] instead of unsupported filter[search]
- list_severities: add missing search param (filter[search])
- create_incident: title is optional per API (auto-generated if null)
- update_incident: add kind, private, labels, incidentTypeIds,
  functionalityIds, cancellationMessage params
- create/update/list incidents: add scheduled, in_progress, completed
  status values
- create_alert: fix status description (only open/triggered on create)
- add_incident_event: add updatedAt to response
- block: add matching subBlocks and params for all new tool fields

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- update_incident: change PATCH to PUT per OpenAPI spec
- index.ts: add types re-export
- types.ts: fix id fields to string | null (matches ?? null runtime)
- block: add value initializers to 4 dropdowns missing them
- registry: fix alphabetical order (incident_types before incidents)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@cursor review

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

@waleedlatif1 waleedlatif1 merged commit 45f053a into staging Apr 2, 2026
12 checks passed
@waleedlatif1 waleedlatif1 deleted the waleedlatif1/add-rootly-integration branch April 2, 2026 18:40
waleedlatif1 added a commit that referenced this pull request Apr 4, 2026
#3899)

* feat(rootly): add Rootly incident management integration with 14 tools

* fix(rootly): address PR review feedback - PATCH method, totalCount, environmentIds

- Changed update_incident HTTP method from PUT to PATCH per Rootly API spec
- Fixed totalCount in all 9 list tools to use data.meta?.total_count from API response
- Added missing updateEnvironmentIds subBlock and params mapping for update_incident

* fix(rootly): add id to PATCH body and unchanged option to update status dropdown

- Include incident id in JSON:API PATCH body per spec requirement
- Add 'Unchanged' empty option to updateStatus dropdown to avoid accidental overwrites

* icon update

* improvement(rootly): complete block-tool alignment and fix validation gaps

- Add missing get_incident output fields (private, shortUrl, closedAt)
- Add missing block subBlocks: createPrivate, alertStatus, alertExternalId, listAlertsServices
- Add pageNumber subBlocks for all 9 list operations
- Add teams/environments filter subBlocks for list_incidents and list_alerts
- Add environmentIds subBlock for create_alert
- Add empty default options to all optional dropdowns (createStatus, createKind, listIncidentsSort, eventVisibility)
- Wire all new subBlocks in tools.config.params and inputs
- Regenerate docs

* fix(rootly): align tools with OpenAPI spec

- list_incident_types: use filter[name] instead of unsupported filter[search]
- list_severities: add missing search param (filter[search])
- create_incident: title is optional per API (auto-generated if null)
- update_incident: add kind, private, labels, incidentTypeIds,
  functionalityIds, cancellationMessage params
- create/update/list incidents: add scheduled, in_progress, completed
  status values
- create_alert: fix status description (only open/triggered on create)
- add_incident_event: add updatedAt to response
- block: add matching subBlocks and params for all new tool fields

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(rootly): final validation fixes from OpenAPI spec audit

- update_incident: change PATCH to PUT per OpenAPI spec
- index.ts: add types re-export
- types.ts: fix id fields to string | null (matches ?? null runtime)
- block: add value initializers to 4 dropdowns missing them
- registry: fix alphabetical order (incident_types before incidents)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* reorg

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant