-
Notifications
You must be signed in to change notification settings - Fork 0
feat: CalendarCache - filter generic calendars from subscription batch #34
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
base: coderabbit_full_base_feat_calendarcache_-_filter_generic_calendars_from_subscription_batch_pr7
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -2,7 +2,7 @@ import type { ISelectedCalendarRepository } from "@calcom/features/selectedCalen | |||||||||||||||||||||
| import type { PrismaClient } from "@calcom/prisma"; | ||||||||||||||||||||||
| import type { Prisma } from "@calcom/prisma/client"; | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| export class SelectedCalendarRepository implements ISelectedCalendarRepository { | ||||||||||||||||||||||
| export class PrismaSelectedCalendarRepository implements ISelectedCalendarRepository { | ||||||||||||||||||||||
| constructor(private prismaClient: PrismaClient) {} | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| async findById(id: string) { | ||||||||||||||||||||||
|
|
@@ -19,10 +19,12 @@ export class SelectedCalendarRepository implements ISelectedCalendarRepository { | |||||||||||||||||||||
| take, | ||||||||||||||||||||||
| teamIds, | ||||||||||||||||||||||
| integrations, | ||||||||||||||||||||||
| genericCalendarSuffixes, | ||||||||||||||||||||||
| }: { | ||||||||||||||||||||||
| take: number; | ||||||||||||||||||||||
| teamIds: number[]; | ||||||||||||||||||||||
| integrations: string[]; | ||||||||||||||||||||||
| genericCalendarSuffixes?: string[]; | ||||||||||||||||||||||
|
Comment on lines
23
to
+27
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Type mismatch: The interface declares 🔧 Proposed fix }: {
take: number;
teamIds: number[];
- integrations: string[];
+ integrations?: string[];
genericCalendarSuffixes?: string[];
}) {Note: If 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||
| }) { | ||||||||||||||||||||||
| return this.prismaClient.selectedCalendar.findMany({ | ||||||||||||||||||||||
| where: { | ||||||||||||||||||||||
|
|
@@ -36,6 +38,11 @@ export class SelectedCalendarRepository implements ISelectedCalendarRepository { | |||||||||||||||||||||
| }, | ||||||||||||||||||||||
| }, | ||||||||||||||||||||||
| }, | ||||||||||||||||||||||
| AND: genericCalendarSuffixes?.length | ||||||||||||||||||||||
| ? genericCalendarSuffixes?.map((suffix) => ({ | ||||||||||||||||||||||
| NOT: { externalId: { endsWith: suffix } }, | ||||||||||||||||||||||
| })) | ||||||||||||||||||||||
| : undefined, | ||||||||||||||||||||||
| }, | ||||||||||||||||||||||
| take, | ||||||||||||||||||||||
| }); | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
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.
🧩 Analysis chain
🏁 Script executed:
Repository: qodo-benchmark/cal.com-combined-coderabbit
Length of output: 1437
Fix class name mismatch between export and test imports.
The class was renamed to
PrismaSelectedCalendarRepositorybut the test file imports the old nameSelectedCalendarRepository(line 3 of the test). This will cause an import error. Either rename the class back toSelectedCalendarRepositoryor update the test imports to usePrismaSelectedCalendarRepository.🤖 Prompt for AI Agents