Repository navigation
Conversation
✅ Deploy Preview for project-idea-board ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Address the two moderate issues in netlify/functions/contact.mts.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Moves contact-email delivery from Mailgun/Netlify to a Make webhook.
Changes:
- Adds Make webhook delivery with API-key authentication and timeout handling.
- Adds escaped HTML email rendering.
- Removes the Netlify email plugin, configuration, dependencies, and legacy template.
File summaries
| File | Summary |
|---|---|
yarn.lock |
Removes obsolete email-plugin dependencies. |
package.json |
Removes the Netlify email plugin. |
netlify/lib/contact-email.ts |
Renders escaped contact-email HTML. |
netlify/functions/contact.mts |
Sends requests through Make; requires shared timeouts for upstream calls and validation of optional ideaTitle as a string. |
netlify.toml |
Removes email plugin configuration. |
emails/contact/index.html |
Removes the legacy template. |
Review details
Suppressed comments (1)
netlify/functions/contact.mts:40
- This timeout only covers the Make request; the Google token exchange and Sheets lookup above still use uncapped
fetchcalls. If either upstream call stalls, the function can exceed Netlify's 10-second limit and be terminated before it reaches this timeout, so the client may see a platform timeout while the lookup/request remains in flight. Use one request deadline (or pass a sharedAbortSignal/timeouts) across all external calls, not just the final webhook.
// Under Netlify's 10s function limit, so we return 502 rather than being killed
const WEBHOOK_TIMEOUT_MS = 8_000;
- Files reviewed: 5/6 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| replyTo: body.senderEmail, | ||
| subject: `Idea Board: message from ${body.senderName}`, | ||
| html: renderContactEmail({ | ||
| ideaTitle: body.ideaTitle ?? "N/A", |
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.
Problem
We trialed Mailgun as an email relay but have a better solution through Central IT's Make account.
Solution
This has been tested in local dev against the published Make webhook, and the necessary env vars have been added to
netlify.We can continue to iterate on the wording and formatting of the email.