Skip to content
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

Feat/GitHub duplication #1818

Merged
merged 22 commits into from
Jan 18, 2024
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
4017e99
Refactor : Modified callback api to have github user id
joyguptaa Dec 28, 2023
7dacd3e
Feat : Added API to add github_user_id to all users
joyguptaa Dec 28, 2023
8407103
Test : Added test for github_user_id script
joyguptaa Dec 28, 2023
d4ae3ac
Bug : Fixed logic while for checking github_user_id
joyguptaa Dec 28, 2023
9f0cc96
Chore : Minor Fixes
joyguptaa Jan 4, 2024
3a3d361
Refactor : Moved code to models
joyguptaa Jan 5, 2024
3a4c604
Merge branch 'develop' into feat/github-duplication
joyguptaa Jan 5, 2024
a8f3d7e
Test : Added failing mock data
joyguptaa Jan 5, 2024
483527c
Merge branch 'feat/github-duplication' of https://github.com/Real-Dev…
joyguptaa Jan 5, 2024
5787ca3
Merge branch 'develop' into feat/github-duplication
joyguptaa Jan 6, 2024
788f63d
Merge branch 'develop' into feat/github-duplication
joyguptaa Jan 7, 2024
8d70a3a
Merge branch 'develop' into feat/github-duplication
joyguptaa Jan 7, 2024
8aa5d6f
Feat : Updated API params
joyguptaa Jan 15, 2024
f1844d6
Feat : Added pagination logic to migrations API
joyguptaa Jan 15, 2024
78e6600
Merge branch 'feat/github-duplication' of https://github.com/Real-Dev…
joyguptaa Jan 15, 2024
61881fb
Merge branch 'develop' into feat/github-duplication
joyguptaa Jan 16, 2024
eded930
Test : Updated the test case
joyguptaa Jan 16, 2024
8f29087
Feat : Updated query params
joyguptaa Jan 16, 2024
8e1eb5f
Test : Updated test cases for migration api
joyguptaa Jan 16, 2024
1c3af94
Merge branch 'feat/github-duplication' of https://github.com/Real-Dev…
joyguptaa Jan 16, 2024
eacc712
Merge branch 'develop' into feat/github-duplication
joyguptaa Jan 17, 2024
86ae835
Merge branch 'develop' into feat/github-duplication
Ajeyakrishna-k Jan 18, 2024
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
Bug : Fixed logic while for checking github_user_id
  • Loading branch information
joyguptaa committed Dec 28, 2023
commit d4ae3ac75ef093650cf33321dc7041b98f7acf50
4 changes: 2 additions & 2 deletions models/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ const addOrUpdate = async (userData, userId = null) => {
let user;
if (userData.github_user_id) {
user = await userModel.where("github_user_id", "==", userData.github_user_id).limit(1).get();
} else {
}
if (!user || (user && user.empty)) {
user = await userModel.where("github_id", "==", userData.github_id).limit(1).get();
}
if (user && !user.empty) {
await userModel.doc(user.docs[0].id).set(userData, { merge: true });

return {
isNewUser: false,
userId: user.docs[0].id,
Expand Down
Loading