Skip to content

Forward GitHub release events to Discord - #65

Merged
HeyItsGilbert merged 1 commit into
mainfrom
feat/release-discord-notifications
Aug 30, 2026
Merged

Forward GitHub release events to Discord#65
HeyItsGilbert merged 1 commit into
mainfrom
feat/release-discord-notifications

Conversation

@HeyItsGilbert

Copy link
Copy Markdown
Member

Summary

  • forward GitHub release webhook events through the existing authenticated Netlify relay
  • retain the event header and raw payload for Discord's GitHub-compatible endpoint
  • keep pull-request action filtering unchanged

Verification

  • bun test tests/github-pr-discord.test.mjs
  • pwsh ./build.ps1 -Quiet -Task Test
  • netlify functions:build --src netlify/functions --functions /tmp/psake-release-functions

The existing organization webhook is already subscribed to Releases; merge/deploy is the remaining configuration step.

Copilot AI lite review requested due to automatic review settings August 30, 2026 02:17
@netlify

netlify Bot commented Aug 30, 2026

Copy link
Copy Markdown

Deploy Preview for psake ready!

Name Link
🔨 Latest commit 8f08478
🔍 Latest deploy log https://app.netlify.com/projects/psake/deploys/6a9392b83171b9000811100c
😎 Deploy Preview https://deploy-preview-65--psake.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR extends the existing Netlify GitHub→Discord relay to also forward GitHub release webhook events (in addition to the already-supported filtered pull_request actions), while keeping the forwarded payload raw and setting the forwarded X-GitHub-Event header appropriately for Discord’s GitHub-compatible endpoint.

Changes:

  • Expand the Netlify function’s event handling to forward release events in addition to eligible pull_request events.
  • Forward the event type via X-GitHub-Event based on the accepted incoming event (pull_request vs release).
  • Update tests to cover forwarding of release events and to reflect the broader relay scope.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
tests/github-pr-discord.test.mjs Renames the suite and adds coverage ensuring release events are forwarded unchanged (raw payload + X-GitHub-Event: release).
netlify/functions/github-pr-discord.ts Generalizes the handler to forward authenticated release deliveries in addition to the existing allowed pull_request actions, and sets the forwarded event header accordingly.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@HeyItsGilbert
HeyItsGilbert merged commit c5a4867 into main Aug 30, 2026
11 checks passed
@HeyItsGilbert
HeyItsGilbert deleted the feat/release-discord-notifications branch August 30, 2026 02:43
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.

2 participants