Skip to content

chore: Replace prisma actions Credential Repository / SelectedCalendar Repository methods#17443

Merged
hbjORbj merged 11 commits into
mainfrom
chore/use-repository-gcal
Nov 6, 2024
Merged

chore: Replace prisma actions Credential Repository / SelectedCalendar Repository methods#17443
hbjORbj merged 11 commits into
mainfrom
chore/use-repository-gcal

Conversation

@hbjORbj
Copy link
Copy Markdown
Contributor

@hbjORbj hbjORbj commented Nov 2, 2024

What does this PR do?

  • A refactor to not use prisma in api/integrations/googlecalendar/callback
  • Create a dedicated google.ts file in packages/lib and move google related methods there
  • This will come handy for feat: New onboarding flow #17251

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • N/A - I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

@dosubot dosubot Bot added the 💻 refactor label Nov 2, 2024
@keithwillcode keithwillcode added consumer core area: core, team members only labels Nov 2, 2024
@graphite-app graphite-app Bot requested a review from a team November 2, 2024 05:49
@graphite-app
Copy link
Copy Markdown

graphite-app Bot commented Nov 2, 2024

Graphite Automations

"Add consumer team as reviewer" took an action on this PR • (11/02/24)

1 reviewer was added to this PR based on Keith Williams's automation.

@vercel
Copy link
Copy Markdown

vercel Bot commented Nov 2, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Visit Preview Nov 4, 2024 4:38pm
calcom-web-canary ⬜️ Ignored (Inspect) Visit Preview Nov 4, 2024 4:38pm

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Nov 2, 2024

E2E results are ready!

@keithwillcode
Copy link
Copy Markdown
Contributor

@hbjORbj sone unit tests are failing

Copy link
Copy Markdown
Contributor

@joeauyeung joeauyeung left a comment

Choose a reason for hiding this comment

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

This is on the right track @hbjORbj.

I noticed there are "Google" specific methods in the repositories. I think these repositories should be agnostic of any app they're interacting with, or else we would end up with a ton of methods for each specific app.

If you want to create any reusable functions for GCal I think it should live in the gcal folder. There we can call on the repository methods.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Nov 2, 2024

CLA assistant check
All committers have signed the CLA.

@hbjORbj
Copy link
Copy Markdown
Contributor Author

hbjORbj commented Nov 4, 2024

@joeauyeung Thanks for the review. Good point, I made GoogleRepository.

Copy link
Copy Markdown
Contributor

@joeauyeung joeauyeung left a comment

Choose a reason for hiding this comment

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

I'll approve for now as the functionality works.

I'm a uneasy with the idea of having google specific functions living mixing with files that handle core logic. I think once we start working on #17251 there might be a better place to keep these files.

@hbjORbj
Copy link
Copy Markdown
Contributor Author

hbjORbj commented Nov 6, 2024

Thanks Joe. Joe and I agreed that we rename GoogleRepository to GoogleService and move it to /services folder to not mix concepts! (Will be included in #17251)

@hbjORbj hbjORbj merged commit 4b38d73 into main Nov 6, 2024
@hbjORbj hbjORbj deleted the chore/use-repository-gcal branch November 6, 2024 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants