Add structured Discord webhook logging for release notifications#2431
Merged
Conversation
- Log webhook request and response metadata - Log announcement payload summary and command lifecycle
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
- Parse `DISCORD_WEBHOOK_URL` with `Config.url` - Pass a typed `URL` through announcement logging and delivery - Use `href` when posting the webhook
Contributor
ApprovabilityA prior Macroscope approval was dismissed. Re-evaluating 342c585… |
- Read Discord mention role IDs from secrets in release workflow - Unify prerelease and latest notifications on `DISCORD_MENTION_ROLE_ID`
Dismissing prior approval to re-evaluate 342c585
added 2 commits
April 30, 2026 20:41
- Parse release URLs as `URL` values at the command boundary - Pass typed URLs through announcement building and webhook posting - Remove the ad hoc web URL string schema
- Switch Discord release logging to log annotations - Keep webhook payload and response metadata attached to structured logs
- Update release notification tests to pass `URL` objects for `releaseUrl` - Covers both nightly prerelease and stable release announcements
Morphexe
pushed a commit
to Morphexe/t3code
that referenced
this pull request
May 4, 2026
…gdotgg#2431) Co-authored-by: Julius Marminge <julius@macmini.local>
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
Testing
DiscordReleaseAnnouncementError.Note
Medium Risk
Touches the release workflow and Discord webhook notification path; misconfiguration or stricter URL parsing could cause release announcements to fail (though
continue-on-errormitigates workflow impact). Adds logging and changes HTTP status handling, which may alter error behavior on non-2xx responses.Overview
Improves Discord release announcement observability by adding structured logs around command startup, payload construction, webhook request dispatch, and response handling in
scripts/notify-discord-release.ts, without logging full secrets/payloads.Tightens URL typing/validation by treating
DISCORD_WEBHOOK_URLas a real URL config and parsing--release-urlinto aURL(and using.hrefwhen building embeds), and updates webhook posting to log/inspect the actual response status before converting non-2xx results into aDiscordReleaseAnnouncementError.Updates the release workflow to source Discord role IDs from secrets (exposed as
DISCORD_MENTION_ROLE_ID) instead of repo vars when invoking the announcement script, and enables pretty console logging viaLogger.consolePretty().Reviewed by Cursor Bugbot for commit 9a15254. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add structured logging and URL validation to Discord release webhook notifications
postDiscordWebhookbefore and after dispatch, including webhook URL metadata and payload summary (embed count, mention syntax, content length).releaseUrland webhook URL types fromstringtoURL, with--release-urlnow validated viaSchema.URLFromStringandDISCORD_WEBHOOK_URLvalidated viaConfig.url.notifyDiscordReleaseCommandwith annotations for target, role ID, release name, version, and tag.varstosecrets.Logger.consolePrettyfor human-readable output during command execution.DiscordReleaseAnnouncementErrorthat includes the HTTP status code; invalidDISCORD_WEBHOOK_URLvalues will fail at configuration time.Macroscope summarized 9a15254.