[Integration] Map & test Discord notification integration #34

Open
opened 2026-03-23 08:39:18 -07:00 by pyr0ball · 0 comments
Owner

Discord — Job Pipeline Notifications

Send Discord messages on pipeline events via a webhook. Mirrors Slack integration but targets Discord channels.

Current state

scripts/integrations/discord.py exists (34 lines, 4 methods). Uses Discord Webhook API — same POST-to-URL pattern as Slack.

Tasks

Mapping

  • Document credential: Discord webhook URL (created per-channel in Discord server settings)
  • Map notification events → Discord embed format (richer than Slack plain text):
    • Use embeds with color coding: blue = new jobs, green = offer, red = rejected, yellow = interview
  • Config file format: config/integrations/discord.yaml

Implementation

  • Confirm DiscordIntegration.connect() validates webhook URL format
  • Implement DiscordIntegration.test() — POST a test embed to the webhook
  • Implement rich embed formatting with color coding and field layout
  • Reuse the same event hook points as Slack (share event emitter if added)

Testing

  • Unit test: embed payload structure is valid Discord API format
  • Integration test: test() sends a visible embed to a real Discord channel
  • Test graceful failure: webhook deleted → log warning, don't crash

Acceptance criteria

  • Settings → Integrations shows Discord card with webhook URL field
  • Test posts a rich embed to the configured Discord channel
  • Notification events match Slack integration (same triggers, Discord embed format)
## Discord — Job Pipeline Notifications Send Discord messages on pipeline events via a webhook. Mirrors Slack integration but targets Discord channels. ### Current state `scripts/integrations/discord.py` exists (34 lines, 4 methods). Uses Discord Webhook API — same POST-to-URL pattern as Slack. ### Tasks **Mapping** - [ ] Document credential: Discord webhook URL (created per-channel in Discord server settings) - [ ] Map notification events → Discord embed format (richer than Slack plain text): - Use embeds with color coding: blue = new jobs, green = offer, red = rejected, yellow = interview - [ ] Config file format: `config/integrations/discord.yaml` **Implementation** - [ ] Confirm `DiscordIntegration.connect()` validates webhook URL format - [ ] Implement `DiscordIntegration.test()` — POST a test embed to the webhook - [ ] Implement rich embed formatting with color coding and field layout - [ ] Reuse the same event hook points as Slack (share event emitter if added) **Testing** - [ ] Unit test: embed payload structure is valid Discord API format - [ ] Integration test: test() sends a visible embed to a real Discord channel - [ ] Test graceful failure: webhook deleted → log warning, don't crash ### Acceptance criteria - Settings → Integrations shows Discord card with webhook URL field - Test posts a rich embed to the configured Discord channel - Notification events match Slack integration (same triggers, Discord embed format)
pyr0ball added this to the Paid Tier GA milestone 2026-03-23 08:39:18 -07:00
pyr0ball added the
feature-request
label 2026-03-23 08:39:18 -07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Circuit-Forge/peregrine#34
No description provided.