Skip to content

feat(PM-1173): Notify all copilots on copilot opportunity #815

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 23 commits into from
Jun 10, 2025
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: added external action email kaufka type
  • Loading branch information
hentrymartin committed Jun 10, 2025
commit 4c98fe7c655cac3ae3cab776c5391e6588b7fda8
4 changes: 2 additions & 2 deletions src/routes/copilotRequest/approveRequest.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ module.exports = (req, data, existingTransaction) => {
req.log.info("Each copilot members", subject);
Copy link

Choose a reason for hiding this comment

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

The log message 'Each copilot members' could be more descriptive. Consider including more context, such as the copilot's handle or email, to make the logs more informative.

Choose a reason for hiding this comment

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

The log message for the copilot portal URL has been removed. If this was intentional, ensure that the removal does not affect the ability to trace the URL being used. If not, consider reinstating it for better traceability.

createEvent(emailEventType, {

Choose a reason for hiding this comment

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

The log statement 'Each copilot members' was removed. If this was intentional, ensure that the logging is still sufficient for debugging purposes. If not, consider adding a relevant log statement to track each copilot being notified.

data: {
userName: subject.handle,
opportunityDetailsUrl: `${copilotPortalUrl}/opportunity/${opportunity.id}`,
user_name: subject.handle,
Copy link

Choose a reason for hiding this comment

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

The key handle has been changed to user_name. Ensure that this change is compatible with the rest of the system and that any downstream dependencies are updated accordingly.

Choose a reason for hiding this comment

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

Consider using camelCase for consistency with JavaScript naming conventions. Change user_name to userName.

opportunity_details_url: `${copilotPortalUrl}/opportunity/${opportunity.id}`,

Choose a reason for hiding this comment

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

Consider using camelCase for consistency with JavaScript naming conventions. Change opportunity_details_url to opportunityDetailsUrl.

},
sendgrid_template_id: "d-3efdc91da580479d810c7acd50a4c17f",
Copy link

Choose a reason for hiding this comment

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

The addition of sendgrid_template_id should be checked to confirm that the template ID d-3efdc91da580479d810c7acd50a4c17f is correct and that it exists in SendGrid. Also, verify that it matches the intended email format and content.

Copy link
Contributor

Choose a reason for hiding this comment

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

Move the template id to constant.

recipients: [subject.email],
Expand Down