-
Notifications
You must be signed in to change notification settings - Fork 53
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
🔧 Make projectId
nullable in OverallReview
table.
#904
🔧 Make projectId
nullable in OverallReview
table.
#904
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Updates to Preview Branch (make-projectId-nullable-in-OverallReview-table) ↗︎
Tasks are run on every commit but only new migration files are pushed.
View logs for this Workflow Run ↗︎. |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
...(payload.projectId | ||
? { | ||
project: { | ||
connect: { | ||
id: payload.projectId, | ||
}, | ||
}, | ||
} | ||
: {}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed the logic to avoid throwing an error when projectId is undefined and to skip connecting the project instead
Issue
Since the
projectId
is passed as undefined at the beginning of the job, we have taken action to make it nullable to avoid errors when saving theOverallReview
.liam/frontend/apps/app/app/api/webhook/github/route.ts
Lines 52 to 59 in 0ca2e9c
Why is this change needed?
What would you like reviewers to focus on?
Testing Verification
We can run:
pnpm test:vitest
at frontend/apps/appWhat was done
🤖 Generated by PR Agent at a178022
projectId
nullable inOverallReview
table to prevent errors.projectId
scenarios.processSaveReview
to account for optionalprojectId
.OverallReview
.Detailed Changes
1 files
Updated tests to handle nullable `projectId`.
1 files
Adjusted logic to handle optional `projectId`.
1 files
Set `projectId` to undefined in task payload.
2 files
Added `@prisma/client` dependency.
Updated lockfile to include `@prisma/client` dependency.
2 files
Added migration to make `projectId` nullable in `OverallReview`.
Updated schema to make `projectId` nullable in `OverallReview`.
Additional Notes