Brought merge suggestions to Node.js#797
Merged
joanreyero merged 20 commits intomainfrom Apr 24, 2023
Merged
Conversation
added 2 commits
April 22, 2023 09:08
29aea0c to
be7addb
Compare
added 2 commits
April 23, 2023 17:56
themarolt
requested changes
Apr 24, 2023
| WITH new_members AS ( | ||
| SELECT id, "tenantId", emails | ||
| FROM members | ||
| WHERE "createdAt" >= now() - INTERVAL :numberOfHours |
Contributor
There was a problem hiding this comment.
Same here for the interval.
joanagmaia
reviewed
Apr 24, 2023
| :member="member" | ||
| :compare-member="membersToMerge[(mi + 1) % membersToMerge.length]" | ||
| :compare-member=" | ||
| membersToMerge[(mi + 1) % membersToMerge.members.length] |
Contributor
There was a problem hiding this comment.
I think you updated membersToMerge from an array to the following structure:
{
members: [],
similarity: number
}
Doesn't this need to be membersToMerge.members[(mi + 1) % membersToMerge.members.length]?
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.
Changes proposed ✍️
Improve merge suggestions and bring them to Node.js in a more optimized way. It also adds a confidence score which is displayed in the frontend.
What
🤖 Generated by Copilot at 29aea0c
This pull request adds a new feature to find and process merge suggestions for members based on similarity scores. It modifies the
memberRepository,memberService, andmemberTypesmodules, and adds a newmergeSuggestionsWorkerfunction. It also updates the test suites and the database migrations accordingly.
🤖 Generated by Copilot at 29aea0c
How
🤖 Generated by Copilot at 29aea0c
addToMergemethod in thememberServiceandmemberRepositoryfiles to accept an array of suggestions instead of a single pair of member ids (link, link, link, link, link)memberService.test,memberRepository.test, andtenantService.testfiles to use the newaddToMergemethod and thefindByIdmethod instead of the deprecatedfindmethod (link, link, link, link, link)memberToMergetable, as they were not compatible with the existing code logic (link)workerFactoryfile to improve the code formatting and readability (link)Checklist ✅
Feature,Improvement, orBug.