-
Notifications
You must be signed in to change notification settings - Fork 441
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: update google-drive sync template to support more file formats #2665
feat: update google-drive sync template to support more file formats #2665
Conversation
WalkthroughThe changes made in the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant GoogleDrive
participant SyncService
User->>SyncService: Request Sync
SyncService->>GoogleDrive: Fetch Files
GoogleDrive-->>SyncService: Return File List
SyncService->>SyncService: Filter Files by MIME Type
SyncService->>SyncService: Process Supported Files
SyncService-->>User: Sync Complete
Assessment against linked issues
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- integration-templates/google-drive/syncs/documents.ts (5 hunks)
Additional comments not posted (6)
integration-templates/google-drive/syncs/documents.ts (6)
15-19
: LGTM!The changes to the
structuredMimeTypeMapping
constant are approved. The additional MIME types improve the handling of different file types.
22-33
: LGTM!The introduction of the
whiteListedMimeTypes
constant is approved. It improves the clarity and maintainability of the code by maintaining a set of acceptable MIME types for filtering files.
39-39
: LGTM!The change to use double quotes for the error message is approved. It improves consistency in the code.
69-81
: LGTM!The changes to the file processing logic are approved. Utilizing the
whiteListedMimeTypes
set for filtering files simplifies the conditional checks and improves maintainability. Passing the file's MIME type to thefetchDocumentContent
function ensures that the appropriate export type is used.
107-112
: LGTM!The changes to skip unsupported file types and log the skipped files are approved. This ensures that only supported file types are processed and provides better observability.
Line range hint
141-170
: LGTM!The changes to the
fetchDocumentContent
function are approved. Utilizing thestructuredMimeTypeMapping
for determining the export MIME type improves the handling of different file types. Logging and skipping unsupported MIME types prevents unnecessary processing and provides better error handling.
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.
thank you for your contribution @homanp
Can you revert the formatting changes please? Otherwise it looks good, I only made one comment
## Describe your changes - Improve `google-drive` integration templates - Follow up of [2665](#2665) ## Issue ticket number and link [EXT-145](https://linear.app/nango/issue/EXT-145/refractor-google-drive-integration)
@hassan254-prog what should happen with this PR? I see you made a pr that referenced this one? Did that incorporate these changes? |
Yes, the merged PR incorporated the changes. We now have a sync that fetches the metadata and an action that fetches the content of the document. |
Thanks, closing this! |
Describe your changes
Fixes #2661
Checklist before requesting a review (skip if just adding/editing APIs & templates)
Summary by CodeRabbit
New Features
Bug Fixes