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
deploy feature branch
  • Loading branch information
hentrymartin committed Jun 2, 2025
commit 223b7bd8d9ba61b083ef60efd255344c7631515e
6 changes: 3 additions & 3 deletions src/routes/copilotRequest/approveRequest.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ module.exports = (data, existingTransaction) => {
return models.CopilotOpportunity
.create(data, { transaction });
}))
Copy link

Choose a reason for hiding this comment

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

The console.log(opportunity); statement has been removed, which is good for production code, but ensure that any necessary logging is still in place for debugging purposes.

Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any reason to use console here instead of the req.log?

.then((opportunity) => {
.then(async (opportunity) => {
Copy link

Choose a reason for hiding this comment

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

Consider removing the console.log(opportunity); statement if it's not needed for debugging purposes. Leaving console logs in production code can lead to performance issues and cluttered logs.

console.log(opportunity);
Copy link

Choose a reason for hiding this comment

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

Avoid using console.log for debugging in production code. Consider using a logging library to handle logs appropriately.

const roles = util.getRolesByRoleName('copilot');
const roleInfo = util.getRoleInfo(roles[0]);
const roles = await util.getRolesByRoleName('copilot');
const roleInfo = await util.getRoleInfo(roles[0]);
console.log(roles, roleInfo, 'roles by copilot');
Copy link

Choose a reason for hiding this comment

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

Consider removing the console.log(roles, roleInfo, 'roles by copilot'); statement if it's not necessary for debugging. Console logs can clutter the output and should be avoided in production code.


return opportunity;
Expand Down