Skip to content

feat(connector): Discord, Elasticsearch, Datadog, Redis, and MongoDB connectors#146

Merged
michaelmcnees merged 2 commits into
mainfrom
feat/connector-batch-2
May 31, 2026
Merged

feat(connector): Discord, Elasticsearch, Datadog, Redis, and MongoDB connectors#146
michaelmcnees merged 2 commits into
mainfrom
feat/connector-batch-2

Conversation

@michaelmcnees

Copy link
Copy Markdown
Collaborator

Summary

Adds 10 new connector actions across 5 services, closing issues #95, #98, #100, #104, #110:

  • discord/send — POST text message to a channel (Bot token auth)
  • discord/embed — POST embed message with title, description, color, fields, footer
  • elasticsearch/search — POST /{index}/_search; supports API key or Basic auth
  • elasticsearch/index — POST/PUT /{index}/_doc[/{id}]; auto-ID or explicit ID
  • datadog/submit_event — POST /api/v1/events; optional alert_type, priority, tags, host
  • datadog/query_metrics — GET /api/v1/query with required from/to Unix timestamps
  • redis/get — GET key; returns {value, exists} (exists=false on cache miss, no error)
  • redis/set — SET key with optional TTL
  • redis/publish — PUBLISH to a pub/sub channel; returns receiver count
  • mongodb/find — Find with optional filter, limit, skip, projection
  • mongodb/aggregate — Run an aggregation pipeline

Also extracts a shared extractBearerToken helper in tools.go, removing duplicate implementations that existed in airtable.go, asana.go, and notion.go.

All connectors follow the established pattern: _credential map extraction, baseURL override for httptest injection, io.LimitReader, url.PathEscape on path segments, and dual map[string]string/map[string]any credential support.

Test plan

  • 50 new unit tests pass (go test ./internal/connector/... -run "TestDiscord|TestElasticsearch|TestDatadog|TestRedis|TestMongo")
  • All 17 registry tests pass
  • go build ./cmd/mantle succeeds
  • HTTP connectors (Discord, Elasticsearch, Datadog) tested against httptest servers
  • Redis/MongoDB tests cover validation paths; live-server tests require Docker (skipped in unit test scope)

Closes #95, #98, #100, #104, #110

🤖 Generated with Claude Code

…connectors (#95, #98, #100, #104, #110)

Adds 10 new connector actions across 5 services:
- discord/send, discord/embed
- elasticsearch/search, elasticsearch/index
- datadog/submit_event, datadog/query_metrics
- redis/get, redis/set, redis/publish
- mongodb/find, mongodb/aggregate

Also consolidates duplicate bearer-token extraction into a shared
extractBearerToken helper in tools.go (removing local copies from
airtable.go, asana.go, notion.go).

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

coderabbitai Bot commented May 30, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@michaelmcnees, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 20 minutes and 43 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6f2fb343-1e50-4fde-9f5e-e627a810cda4

📥 Commits

Reviewing files that changed from the base of the PR and between d06e723 and d05fba6.

⛔ Files ignored due to path filters (2)
  • go.work.sum is excluded by !**/*.sum
  • packages/engine/go.sum is excluded by !**/*.sum
📒 Files selected for processing (16)
  • packages/engine/go.mod
  • packages/engine/internal/connector/airtable.go
  • packages/engine/internal/connector/asana.go
  • packages/engine/internal/connector/connector.go
  • packages/engine/internal/connector/datadog.go
  • packages/engine/internal/connector/datadog_test.go
  • packages/engine/internal/connector/discord.go
  • packages/engine/internal/connector/discord_test.go
  • packages/engine/internal/connector/elasticsearch.go
  • packages/engine/internal/connector/elasticsearch_test.go
  • packages/engine/internal/connector/mongodb.go
  • packages/engine/internal/connector/mongodb_test.go
  • packages/engine/internal/connector/notion.go
  • packages/engine/internal/connector/redis.go
  • packages/engine/internal/connector/redis_test.go
  • packages/engine/internal/connector/tools.go
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/connector-batch-2

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9d2f418c1c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/engine/internal/connector/discord.go Outdated
… through discordPostMessage

Fixes lint: func (*ElasticsearchSearchConnector).apiURL is unused.
Addresses Codex feedback: discordPostMessage now receives the connector's
http.Client instead of always using the default client.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@michaelmcnees michaelmcnees merged commit ec79ff2 into main May 31, 2026
13 checks passed
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.

[Feature] Native Discord connector (discord/send, discord/embed)

1 participant