feat(build): DM the user on Discord when a triggered build finishes#105
Open
barnabasbusa wants to merge 3 commits into
Open
feat(build): DM the user on Discord when a triggered build finishes#105barnabasbusa wants to merge 3 commits into
barnabasbusa wants to merge 3 commits into
Conversation
Adds a --discord-dm flag to `panda build` that the proxy uses to send a Discord DM (via the panda-pulse bot token, plumbed through proxy config) when the workflow run reaches a terminal state. - CLI: --discord-dm <user> / --no-discord-dm. The first time --discord-dm is supplied and no default is configured, the username is persisted to config.user.yaml under notifications.discord.username so subsequent builds notify without re-passing the flag. - Server: forwards Notify spec to the proxy's /github/actions/trigger. - Proxy: optional `discord:` config with bot_token + guild_id. When set, the GitHub handler spawns a watcher goroutine after a successful dispatch that polls the run and DMs the resolved user on completion. Resolution accepts either a numeric Discord ID or a username (looked up via guild member search). - Discord client uses raw REST against discord.com/api/v10 to avoid a websocket/gateway dependency.
Adds an optional Discord username step to `panda init` so build-completion DMs work out of the box without ever passing --discord-dm. The value lands in config.user.yaml under notifications.discord.username, which `panda build` already reads as its default target. - Interactive: prompts on a TTY after auth, unless --skip-discord is set or a username is already configured. - Non-interactive: --discord-username <value> sets it directly; --skip-discord silences the prompt entirely. Stdin not a TTY ⇒ no prompt, no failure. - Persists via the same config.SaveUserConfig path used by `panda build`'s auto-save behavior, so the flows produce identical YAML.
6 tasks
feat(init): prompt for + persist a Discord username during setup
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.
Summary
Adds end-to-end Discord DM notifications for `panda build` so you get a message when the dispatched workflow finishes — no need to keep a terminal open. After #106 was folded in, this PR also includes the `panda init` setup prompt so the username is captured once and reused forever.
What's in here
`panda build`
`panda init`
Proxy
Architecture
Pairs with
Tradeoffs / known limitations
Test plan