Skip to content

feat(integrations): add Gong incident.io Railway and New Relic#4663

Merged
waleedlatif1 merged 11 commits into
stagingfrom
codex-ops-integrations
May 19, 2026
Merged

feat(integrations): add Gong incident.io Railway and New Relic#4663
waleedlatif1 merged 11 commits into
stagingfrom
codex-ops-integrations

Conversation

@waleedlatif1
Copy link
Copy Markdown
Collaborator

Summary

  • add New Relic, Railway, Gong, and incident.io integration updates
  • add tool, block, registry, icon, landing, and docs wiring for the shipped integrations

Type of Change

  • Feature

Testing

  • Ran bun run lint
  • Ran bun run check:api-validation:strict
  • Ran New Relic validate-integration pass against live New Relic docs
  • Ran bun run scripts/generate-docs.ts
  • Ran bun run --cwd apps/sim type-check
  • Ran git diff --check

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)

@vercel
Copy link
Copy Markdown

vercel Bot commented May 19, 2026

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped May 19, 2026 9:00pm

Request Review

@cursor
Copy link
Copy Markdown

cursor Bot commented May 19, 2026

PR Summary

Medium Risk
Adds two new integrations (New Relic, Railway) and expands existing Gong/incident.io blocks, touching both UI block configuration and tool request/response handling. Risk is mainly around API parameter mapping/validation and potential breaking changes to existing workflow configs.

Overview
Adds New Relic and Railway integrations across docs and the Sim app, including new icons, tool docs pages, landing integrations.json entries, and new NewRelicBlock/RailwayBlock registered in blocks/registry.ts.

Extends Gong with a new gong_create_call tool + UI operation, and improves Gong tool robustness by trimming inputs, defaulting toDateTime to execution time, normalizing ID lists/JSON array parsing via shared utils, and standardizing error messages; list endpoints now surface requestId and paging metadata.

Extends incident.io by adding workflow creation, escalation-path listing, and new filters/inputs (sorting/filter mode, incident mode, user filters, schedule override layer_id), plus refactors block param handling (boolean coercion, renamed schedule entry window fields) and updates docs accordingly.

Reviewed by Cursor Bugbot for commit b5fbb25. Configure here.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 19, 2026

Greptile Summary

This PR adds four new integrations — Gong, incident.io, New Relic, and Railway — with full tool, block, registry, icon, landing, and docs wiring. Existing incident.io tools receive significant improvements: stricter JSON parsing for workflow operations, API schema alignment (schedule entries, escalations, escalation paths), and removal of the silent-fallback logger-based parsing that previously swallowed JSON errors.

  • New integrations: New Relic (NRQL query, entity search/get, deployment change tracking), Railway (project/environment/variable/deployment CRUD via GraphQL), Gong (create call, enriched outputs for list calls/users), plus a comprehensive incident.io expansion (escalation paths list, escalation pagination, schedule overrides layer_id, user/action filter params).
  • Incident.io hardening: parseRequiredIncidentioJsonParam enforces required JSON fields in workflows_update; mapIncidentioWorkflow replaces raw field copying; escalation_paths_update and workflows_update are correctly switched to full-replacement PUT semantics with required fields.

Confidence Score: 5/5

Safe to merge. All four integrations are additive with no changes to shared infrastructure or existing auth flows.

All previously flagged issues (workflow JSON silent fallback, entityGuid injection, compactVariables empty-string filtering) have been resolved on the branch. The new tools follow established patterns, credentials use the correct visibility, and GraphQL inputs are either parameterised or thoroughly validated. The remaining findings are minor quality improvements that do not affect correctness at runtime.

No files require special attention. The incident.io tools consistently omit an HTTP error guard in transformResponse, but this is a pre-existing pattern shared across the integration and is not a regression introduced by this PR.

Important Files Changed

Filename Overview
apps/sim/tools/new_relic/create_deployment_event.ts New file. GUID injection fix from previous review is applied. Custom attribute validation is thorough. version lacks a non-empty guard after trimming but API would reject the empty string anyway.
apps/sim/tools/incidentio/workflows_update.ts Extensively refactored to use parseRequiredIncidentioJsonParam for all required JSON fields — fixes the silent-fallback bug from the prior review. Required fields are now correctly enforced.
apps/sim/tools/incidentio/utils.ts New file introducing parseIncidentioJsonParam, parseRequiredIncidentioJsonParam, and mapIncidentioWorkflow. Centralises workflow-field mapping and JSON parsing; logic is correct.
apps/sim/tools/railway/utils.ts New file. compactVariables filters only undefined (prior-review fix applied). optionalString correctly normalises blank inputs. railwayHeaders distinguishes project tokens from bearer tokens.
apps/sim/tools/incidentio/escalation_paths_list.ts New file. Missing !response.ok guard in transformResponse; an HTTP error response would return success: true with empty arrays instead of throwing, consistent with the existing incidentio pattern but still a concern for new code.
apps/sim/tools/new_relic/nrql_query.ts New file. NRQL is safely embedded via gqlString (JSON.stringify). accountId goes through Math.trunc(Number(...)) making string inputs safe.
apps/sim/tools/gong/create_call.ts New file. Required fields trimmed; JSON fields go through parseGongJsonArray which throws on malformed input. direction is the only required string not trimmed, a minor inconsistency.
apps/sim/tools/incidentio/schedule_entries_list.ts Restructured response shape from flat array to {final, overrides, scheduled} groups to match the actual API response. Pagination params removed. URL building moved to new URL() constructor.
apps/sim/tools/incidentio/workflows_list.ts Pagination removed (not supported by /v2/workflows). Workflow mapping uses the new mapIncidentioWorkflow helper. Output schema updated to full workflow shape.

Reviews (4): Last reviewed commit: "fix(gong): align list calls block valida..." | Re-trigger Greptile

Comment thread apps/sim/tools/incidentio/workflows_update.ts
Comment thread apps/sim/tools/gong/list_flows.ts
Comment thread apps/sim/tools/railway/utils.ts
Comment thread apps/sim/blocks/blocks/new_relic.ts Outdated
Comment thread apps/sim/tools/incidentio/workflows_update.ts
Comment thread apps/sim/tools/incidentio/workflows_create.ts
@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@cursor review

Comment thread apps/sim/tools/gong/list_calls.ts
Comment thread apps/sim/tools/new_relic/create_deployment_event.ts
Comment thread apps/sim/tools/new_relic/create_deployment_event.ts
@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@cursor review

Comment thread apps/sim/blocks/blocks/gong.ts Outdated
Comment thread apps/sim/blocks/blocks/gong.ts
@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@cursor review

Comment thread apps/sim/tools/gong/list_flows.ts
@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@cursor review

@waleedlatif1 waleedlatif1 merged commit 6c755cb into staging May 19, 2026
14 checks passed
@waleedlatif1 waleedlatif1 deleted the codex-ops-integrations branch May 19, 2026 21:12
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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit b5fbb25. Configure here.

if (params.user_slack_id) user.slack_user_id = params.user_slack_id

return {
layer_id: params.layer_id.trim(),
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Empty override user sent

Medium Severity

The schedule override request always includes a user object even when no user_id, user_email, or user_slack_id is provided, so the body can be sent with {}. The block UI says one identifier is required, but the tool does not validate that before calling incident.io.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit b5fbb25. Configure here.

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