Repository navigation
feat: Discord lifecycle notifications — spawn side (Phase 1 of #2) - #169
Merged
Merged
Conversation
Adds Discord as a third notification platform alongside Slack/Teams. spored's notifier no longer hardcodes "slack": platform comes from a new spawn:notify-platform tag (default slack, so existing launches are unchanged), set by `spawn launch --notify-platform discord`. `spawn notify workspace-add --platform discord` accepts --public-key (Discord's Ed25519 application key — there's no signing secret, so --signing-secret isn't required for discord) and --webhook-url for the channel webhook. New PublicKey + IncomingWebhookURL fields on the stored workspace. The Discord embed sender and the /notify branch live in the spore-host umbrella (lambda/spore-bot); this is the spawn-side CLI + spored wiring. Slash commands are Phase 2.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 1 of #2 (Discord support), spawn-repo half. Pairs with the umbrella PR adding the Discord embed sender to
lambda/spore-bot.What
Discord becomes a third notification platform alongside Slack/Teams, for outbound lifecycle notifications (TTL/idle/spot/completion). Slash commands are Phase 2.
pkg/agent/notifier.go): platform was hardcoded"slack"; now fromcfg.NotifyPlatform, defaulting toslackwhen unset (existing launches unchanged).spawn:notify-platformtag — read inpkg/provider/ec2.go, written bybuildTags(pkg/aws/client.go), set by the launch flag.spawn launch --notify-platform slack|teams|discord.spawn notify workspace-add --platform discord: Discord verifies interactions with an Ed25519 public key, not a signing secret, so--signing-secretisn't required fordiscord— added--public-key(required for discord; used by Phase 2) and--webhook-url(channel webhook). NewPublicKey+IncomingWebhookURLfields on the stored workspace;--platformhelp + errors now sayslack, teams, or discord.Where the rest lives
The Discord embed builder + the
/notifyDiscord branch are in spore-host/spore-hostlambda/spore-bot/(separate PR), since that's the hosted service that does platform-specific delivery. spored just POSTs a generic event withplatform: discord.Tests
pkg/agent/notifier_test.go: platform comes from config; defaults toslack; nil Notifier when no URL.make checkgreen.Phase 2 (interactions endpoint: Ed25519 verify, PING/PONG,
/sporeslash commands) tracked on #2.