-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Google Drive Access Proposals #16268
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 3 Skipped Deployments
|
WalkthroughThis pull request primarily updates version numbers across multiple Google Drive components and introduces new functionality for managing access proposals. New action modules for listing and resolving access proposals have been added, and the main Google Drive app now includes a new property along with methods to support these features. Additionally, a new source component and test event for access proposals have been introduced. Package dependencies were also updated. Changes
Sequence Diagram(s)sequenceDiagram
participant U as User
participant A as Action Module
participant G as GoogleDriveApp
participant API as Google Drive API
U->>A: Invoke list-access-proposals with fileId
A->>G: Call listAccessProposals(fileId)
loop Pagination Loop
G->>API: Request proposals (with pageToken)
API-->>G: Return proposals & next token
end
G-->>A: Return aggregated proposals
A-->>U: Display proposals
U->>A: Invoke resolve-access-proposal (proposalId, action)
A->>G: Call resolveAccessProposal(proposalId, action)
G->>API: Process resolution request
API-->>G: Return resolution status
G-->>A: Confirm proposal resolution
A-->>U: Show resolution result
Assessment against linked issues
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
components/google_drive/actions/delete-shared-drive/delete-shared-drive.mjsOops! Something went wrong! :( ESLint: 8.57.1 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs components/google_drive/actions/add-file-sharing-preference/add-file-sharing-preference.mjsOops! Something went wrong! :( ESLint: 8.57.1 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs components/google_drive/actions/create-file-from-text/create-file-from-text.mjsOops! Something went wrong! :( ESLint: 8.57.1 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs
Tip ⚡💬 Agentic Chat (Pro Plan, General Availability)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 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: 3
🔭 Outside diff range comments (1)
components/google_drive/actions/delete-file/delete-file.mjs (1)
38-38
:⚠️ Potential issueMissing Closing Parenthesis in Template Literal
The summary message string misses a closing parenthesis, which could lead to confusing output. Consider updating it as shown below to properly format the file ID.- $.export("$summary", `Successfully deleted file (ID: ${fileId}`); + $.export("$summary", `Successfully deleted file (ID: ${fileId})`);
🧹 Nitpick comments (2)
components/google_drive/sources/new-access-proposal/test-event.mjs (1)
1-13
: New test event structure for access proposals looks good.This test event template provides the expected structure for Google Drive access proposals, including requester and recipient information, requested roles, and timestamps.
Consider adding a few comments to explain the purpose of this test event and each field's meaning, especially for developers who might not be familiar with Google Drive's access proposal feature.
export default { + // Sample test event for Google Drive access proposals "fileId": "", "proposalId": "", - "requesterEmailAddress": "", - "recipientEmailAddress": "", + "requesterEmailAddress": "", // Email of the person requesting access + "recipientEmailAddress": "", // Email of the person who can grant access "rolesAndViews": [ { "role": "writer" } ], - "requestMessage": "", + "requestMessage": "", // Message sent with the access request "createTime": "2025-04-11T18:36:28.979859Z" }components/google_drive/google_drive.app.mjs (1)
1470-1477
: Consider adding documentation for new API methodsThe implementations of
listAccessProposals
andresolveAccessProposal
are concise and effective. Consider adding JSDoc comments to maintain consistency with other methods in the file, which have detailed documentation.+ /** + * List access proposals for a file or folder + * + * @param {object} [opts={}] - an object representing configuration options + * used to list access proposals, including fileId and pageToken + * @returns a list of access proposals + */ async listAccessProposals(opts = {}) { const drive = this.drive(); return (await drive.accessproposals.list(opts)).data; }, + /** + * Resolve an access proposal for a file or folder + * + * @param {object} [opts={}] - an object representing configuration options + * used to resolve an access proposal, including fileId, proposalId, action, role, and sendNotification + * @returns the result of the resolution operation + */ async resolveAccessProposal(opts = {}) { const drive = this.drive(); return (await drive.accessproposals.resolve(opts)).data; },
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (38)
components/google_drive/actions/add-file-sharing-preference/add-file-sharing-preference.mjs
(1 hunks)components/google_drive/actions/copy-file/copy-file.mjs
(1 hunks)components/google_drive/actions/create-file-from-template/create-file-from-template.mjs
(1 hunks)components/google_drive/actions/create-file-from-text/create-file-from-text.mjs
(1 hunks)components/google_drive/actions/create-folder/create-folder.mjs
(1 hunks)components/google_drive/actions/create-shared-drive/create-shared-drive.mjs
(1 hunks)components/google_drive/actions/delete-file/delete-file.mjs
(1 hunks)components/google_drive/actions/delete-shared-drive/delete-shared-drive.mjs
(1 hunks)components/google_drive/actions/download-file/download-file.mjs
(1 hunks)components/google_drive/actions/find-file/find-file.mjs
(1 hunks)components/google_drive/actions/find-folder/find-folder.mjs
(1 hunks)components/google_drive/actions/find-forms/find-forms.mjs
(1 hunks)components/google_drive/actions/find-spreadsheets/find-spreadsheets.mjs
(1 hunks)components/google_drive/actions/get-file-by-id/get-file-by-id.mjs
(1 hunks)components/google_drive/actions/get-folder-id-for-path/get-folder-id-for-path.mjs
(1 hunks)components/google_drive/actions/get-shared-drive/get-shared-drive.mjs
(1 hunks)components/google_drive/actions/list-access-proposals/list-access-proposals.mjs
(1 hunks)components/google_drive/actions/list-files/list-files.mjs
(1 hunks)components/google_drive/actions/move-file-to-trash/move-file-to-trash.mjs
(1 hunks)components/google_drive/actions/move-file/move-file.mjs
(1 hunks)components/google_drive/actions/resolve-access-proposal/resolve-access-proposal.mjs
(1 hunks)components/google_drive/actions/search-shared-drives/search-shared-drives.mjs
(1 hunks)components/google_drive/actions/update-file/update-file.mjs
(1 hunks)components/google_drive/actions/update-shared-drive/update-shared-drive.mjs
(1 hunks)components/google_drive/actions/upload-file/upload-file.mjs
(1 hunks)components/google_drive/google_drive.app.mjs
(2 hunks)components/google_drive/package.json
(2 hunks)components/google_drive/sources/changes-to-specific-files-shared-drive/changes-to-specific-files-shared-drive.mjs
(1 hunks)components/google_drive/sources/changes-to-specific-files/changes-to-specific-files.mjs
(1 hunks)components/google_drive/sources/new-access-proposal/new-access-proposal.mjs
(1 hunks)components/google_drive/sources/new-access-proposal/test-event.mjs
(1 hunks)components/google_drive/sources/new-files-instant/new-files-instant.mjs
(1 hunks)components/google_drive/sources/new-files-shared-drive/new-files-shared-drive.mjs
(1 hunks)components/google_drive/sources/new-or-modified-comments/new-or-modified-comments.mjs
(1 hunks)components/google_drive/sources/new-or-modified-files/new-or-modified-files.mjs
(1 hunks)components/google_drive/sources/new-or-modified-folders/new-or-modified-folders.mjs
(1 hunks)components/google_drive/sources/new-shared-drive/new-shared-drive.mjs
(1 hunks)components/google_drive/sources/new-spreadsheet/new-spreadsheet.mjs
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: Publish TypeScript components
- GitHub Check: Verify TypeScript components
🔇 Additional comments (39)
components/google_drive/sources/new-shared-drive/new-shared-drive.mjs (1)
8-8
: Version Update Approved.
The version number has been updated from "0.1.7" to "0.1.8". This change is purely a version bump and does not impact the module's functionality. It aligns with the coordinated versioning effort across related Google Drive modules.components/google_drive/sources/new-spreadsheet/new-spreadsheet.mjs (1)
9-9
: Consistent Version Increment.
The module’s version update to "0.1.10" is correctly applied. There are no functional modifications beyond this update, and the change is consistent with the overall versioning strategy.components/google_drive/sources/new-or-modified-files/new-or-modified-files.mjs (1)
27-27
: Version Bump Noted.
The version has been updated from "0.3.4" to "0.3.5". This is a straightforward update with no changes to the actual logic or functionality, ensuring consistency across modules.components/google_drive/sources/new-files-instant/new-files-instant.mjs (1)
13-13
: Module Version Updated.
The version increase from "0.1.12" to "0.1.13" is appropriate and does not indicate any change in behavior or functionality. The update follows the coordinated approach seen in other Google Drive components.components/google_drive/sources/new-or-modified-comments/new-or-modified-comments.mjs (1)
20-20
: Version Increment Correct.
The version change to "1.0.4" is correctly implemented without altering the underlying logic. This update is consistent with the general versioning updates across the Google Drive integration modules.components/google_drive/sources/new-files-shared-drive/new-files-shared-drive.mjs (1)
10-10
: Version Bump UpdateThe version has been updated from "0.0.1" to "0.0.2". This change is a straightforward version increment with no impact on functionality. The update is consistent with similar changes in the module ecosystem.
components/google_drive/sources/changes-to-specific-files/changes-to-specific-files.mjs (1)
18-18
: Version Bump UpdateThe version has been updated from "0.2.4" to "0.2.5." This change follows the coordinated versioning strategy and does not affect the module’s logic or functionality.
components/google_drive/sources/changes-to-specific-files-shared-drive/changes-to-specific-files-shared-drive.mjs (1)
30-30
: Version Bump UpdateThe version change to "0.2.5" (from "0.2.4") is applied correctly and maintains consistency with the overall versioning update across the Google Drive components.
components/google_drive/actions/copy-file/copy-file.mjs (1)
7-7
: Version Bump UpdateThe module’s version has been updated from "0.1.7" to "0.1.8." This clear, isolated version increment does not modify functionality, ensuring congruence with parallel updates.
components/google_drive/actions/find-folder/find-folder.mjs (1)
10-10
: Version Bump UpdateThe exported module now reflects version "0.1.8" after the update. This is in line with the versioning enhancements across related action modules and does not affect functionality.
components/google_drive/actions/delete-file/delete-file.mjs (1)
8-8
: Version Number Bump Update
The version was updated to "0.1.9". This change is consistent with the coordinated versioning effort across related modules.components/google_drive/actions/find-file/find-file.mjs (1)
9-9
: Version Number Bump Update
The module version was updated from "0.1.7" to "0.1.8" to align with other components.components/google_drive/actions/get-shared-drive/get-shared-drive.mjs (1)
7-7
: Version Number Bump Update
The module’s version has been incremented from "0.1.7" to "0.1.8". This is a straightforward update with no functional changes.components/google_drive/actions/move-file/move-file.mjs (2)
7-7
: Version Number Bump Update
The module version has been updated from "0.1.7" to "0.1.8", keeping the version schema consistent across similar actions.
42-48
: File Move Logic Verification
The logic for retrieving the file and updating its parents is clear. Ensure thatthis.googleDrive.getFile
reliably returns an object with a validparents
array so that calling.join(",")
does not lead to runtime issues.components/google_drive/actions/create-shared-drive/create-shared-drive.mjs (1)
7-7
: Version Number Bump Update
The module version was bumped to "0.1.9". This update is consistent with the versioning strategy seen in other parts of the Google Drive actions.components/google_drive/actions/delete-shared-drive/delete-shared-drive.mjs (1)
7-7
: Update version number to 0.1.8
The version bump reflects a minor update consistent with similar Google Drive action modules. No functional changes beyond the version update were observed.components/google_drive/actions/search-shared-drives/search-shared-drives.mjs (1)
7-7
: Update version number to 0.1.9
This change updates the module’s version as part of the coordinated versioning effort. The update is clear and does not affect functionality.components/google_drive/actions/create-file-from-text/create-file-from-text.mjs (1)
8-8
: Update version number to 0.2.1
The version number has been incremented to "0.2.1" in line 8, aligning with similar updates across other files. This update is straightforward with no functional modifications introduced.components/google_drive/actions/find-forms/find-forms.mjs (1)
9-9
: Update version number to 0.0.9
The version change to "0.0.9" is consistent with the versioning pattern observed in other modules. No additional changes were found in this diff.components/google_drive/actions/download-file/download-file.mjs (1)
21-21
: Update version number to 0.1.8
This update reflects the intended version bump for the download-file action module, with no other modifications affecting logic or functionality.components/google_drive/actions/move-file-to-trash/move-file-to-trash.mjs (1)
8-8
: Version Bump Confirmation.
The exported version has been updated from "0.1.7" to "0.1.8". This change is solely for versioning and does not affect functionality.components/google_drive/actions/upload-file/upload-file.mjs (1)
16-16
: Version Update Verification.
The module version was updated from "1.0.0" to "1.0.1". There are no functional changes outside this version bump, ensuring consistency with other Google Drive actions.components/google_drive/actions/create-folder/create-folder.mjs (1)
16-16
: Consistent Version Increment.
The version number has been incremented from "0.1.8" to "0.1.9". This minor update does not modify any functionality, aligning with the coordinated version update across similar modules.components/google_drive/actions/update-file/update-file.mjs (1)
12-12
: Version Bump Check.
The exported module’s version was updated from "1.0.0" to "1.0.1". The internal logic—including file stream retrieval, conditional media update, and metadata update—remains intact.components/google_drive/actions/list-files/list-files.mjs (1)
8-8
: Simple Version Update.
The version has been updated from "0.1.11" to "0.1.12". As with the other components, this change solely reflects a version increment without impacting the module’s behavior.components/google_drive/actions/get-file-by-id/get-file-by-id.mjs (1)
8-8
: Version Bump Update:
The module’s version has been incremented from the previous version (implicitly "0.0.4") to"0.0.5"
. This change is isolated to the version number only and is in line with other similar updates across the Google Drive modules.components/google_drive/actions/add-file-sharing-preference/add-file-sharing-preference.mjs (1)
23-23
: Version Increment Confirmation:
The version number was updated from"0.2.0"
to"0.2.1"
, which is consistent with the coordinated updates across the Google Drive actions. No functional changes were introduced, and the update adheres to internal versioning practices.components/google_drive/actions/update-shared-drive/update-shared-drive.mjs (1)
7-7
: Minor Version Update:
The version for the “Update Shared Drive” module has been bumped from"0.1.7"
to"0.1.8"
. This update is straightforward and aligns well with similar module version changes in this component.components/google_drive/sources/new-or-modified-folders/new-or-modified-folders.mjs (1)
23-23
: Version Bump Notice:
The version has been updated from"0.1.9"
to"0.1.10"
. This increment appears to be part of a coordinated update across multiple modules, and no changes to functionality are observed.components/google_drive/actions/find-spreadsheets/find-spreadsheets.mjs (1)
9-9
: Consistent Version Update:
The version has been increased from"0.1.7"
to"0.1.8"
. This minor adjustment is consistent with the overall updated versioning strategy used across the Google Drive component modules.components/google_drive/actions/create-file-from-template/create-file-from-template.mjs (1)
11-11
: Version bump looks good.The version has been incremented from "0.1.7" to "0.1.8" as part of a coordinated version update across multiple Google Drive components.
components/google_drive/actions/get-folder-id-for-path/get-folder-id-for-path.mjs (1)
15-15
: Version increment approved.The version has been updated from "0.1.9" to "0.1.10" as part of the coordinated version updates across Google Drive components.
components/google_drive/package.json (2)
3-3
: Minor version update reflects new functionality.The package version bump from "0.8.11" to "0.9.0" appropriately reflects the addition of new access proposal functionality, following semantic versioning standards.
14-14
:❓ Verification inconclusive
Significant platform dependency update.
The @pipedream/platform dependency has been significantly upgraded from ^1.4.0 to ^3.0.3, which is a major version jump.
🏁 Script executed:
#!/bin/bash # Check for breaking changes or migration guides between platform versions echo "Checking GitHub repository for breaking changes or migration guides..." gh api repos/PipedreamHQ/pipedream/releases | jq -r '.[] | select(.tag_name | contains("@pipedream/platform")) | {tag_name: .tag_name, body: .body}'Length of output: 301
Dependency Update Verification – Manual Confirmation Required
The dependency update in
components/google_drive/package.json
(line 14) upgrades@pipedream/platform
from^1.4.0
to^3.0.3
. An automated check against the Pipedream releases did not return any migration guide or explicit reference to breaking changes. However, given the major version jump, please manually verify:
- Migration Guide & Breaking Changes: Although no automated output was found, double-check the official release/changelog on the Pipedream repository for any undocumented API changes or deprecations.
- Impact on Dependent Code: Ensure that any functionality relying on
@pipedream/platform
is thoroughly tested to catch potential issues arising from unforeseen changes in the new version.components/google_drive/actions/resolve-access-proposal/resolve-access-proposal.mjs (1)
1-79
: Well-structured module for resolving access proposalsThis new action module is well-designed for handling access proposal resolutions in Google Drive. The implementation properly validates required fields, handles optional parameters, and provides clear documentation with API reference links.
A few observations:
- The module correctly validates that roles are provided when accepting a proposal
- Good error handling with ConfigurationError
- Clear property definitions with appropriate dependencies
- Comprehensive options for the action parameter
components/google_drive/sources/new-access-proposal/new-access-proposal.mjs (2)
38-43
: Timestamp management logic looks goodThe implementation for storing and retrieving timestamps is clean and straightforward. Using
this.db.get
with a default value of 0 ensures the source will work correctly on its first run.
44-50
: Event metadata generation is well-implementedThe metadata generation includes all necessary information: a unique ID from the proposal ID, a descriptive summary including the requester's email, and the timestamp from the proposal's creation time.
components/google_drive/google_drive.app.mjs (1)
258-287
: Well-implemented property definition for access proposal IDThe new
accessProposalId
property definition is well-structured with clear labels and descriptions. The options method properly handles empty states and pagination. Good job checking iffileId
is provided before making API calls.
components/google_drive/sources/new-access-proposal/new-access-proposal.mjs
Show resolved
Hide resolved
components/google_drive/actions/list-access-proposals/list-access-proposals.mjs
Show resolved
Hide resolved
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.
Hi @michelle0927 lgtm! Ready for QA!
Resolves #16204
Summary by CodeRabbit
New Features
Chores