Skip to content

Conversation

michelle0927
Copy link
Collaborator

@michelle0927 michelle0927 commented Oct 3, 2025

Updates Google Sheets sources to watch the drive instead of the selected file.

Summary by CodeRabbit

  • Chores

    • Bumped Google Sheets package to 0.9.1 and updated Google Drive integration dependency.
    • Incremented versions for Google Sheets sources: New Comment (0.1.2), New Row Added (0.2.2 / polling 0.1.2), New Updates (Instant) (0.3.2), New Worksheet (Instant) (0.2.2).
  • New Features

    • Added optional "Watch Drive" mode to Sheets instant sources to monitor Drive-level changes and renew subscriptions.
    • HTTP handlers now support custom responses (early 200 OK) for relevant events.
  • Refactor

    • Updated activation and subscription flows for Drive-based behavior in Sheets instant sources.

Copy link

vercel bot commented Oct 3, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
pipedream-docs Ignored Ignored Oct 3, 2025 10:15pm
pipedream-docs-redirect-do-not-edit Ignored Ignored Oct 3, 2025 10:15pm

Copy link
Contributor

coderabbitai bot commented Oct 3, 2025

Warning

Rate limit exceeded

@michelle0927 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 14 minutes and 14 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 28f4310 and 685508d.

📒 Files selected for processing (1)
  • components/google_sheets/sources/common/http-based/sheet.mjs (4 hunks)

Walkthrough

Updates package versions and source metadata across Google Sheets components. The HTTP-based sheet source now imports and exposes Drive methods, adds a watchDrive prop and change-token helpers, branches activateHook/renew/ run logic to support drive-watching (including early HTTP 200 responses), and adjusts the HTTP prop shape for custom responses.

Changes

Cohort / File(s) Summary
Package manifest
components/google_sheets/package.json
Version 0.9.0 → 0.9.1; dependency @pipedream/google_drive ^1.1.0 → ^1.1.1.
HTTP-based sheet source: drive integration & new props/methods
components/google_sheets/sources/common/http-based/sheet.mjs
Imports drive.mjs and spreads drive.methods into export; adds boolean prop watchDrive; adds _getChangeToken, _setChangeToken, isSheetRelevant, renewDriveSubscription; activateHook(channelID), run(event) and renewal flow now branch when watchDrive is true to use Drive-based activation/renewal and to early-exit non-relevant Drive changes.
HTTP-based base prop change
components/google_sheets/sources/common/http-based/base.mjs
props.http changed from string "$.interface.http" to object { type: "$.interface.http", customResponse: true }.
Drive source: early HTTP response on event handling
components/google_sheets/sources/common/http-based/drive.mjs
run(event) now responds this.http.respond({ status: 200 }) for relevant non-timer HTTP events before fetching/processing the spreadsheet.
Version bumps — instant/polling sources (no logic changes)
components/google_sheets/sources/new-comment/new-comment.mjs, components/google_sheets/sources/new-row-added/new-row-added.mjs, components/google_sheets/sources/new-updates/new-updates.mjs, components/google_sheets/sources/new-worksheet/new-worksheet.mjs, components/google_sheets/sources/new-row-added-polling/new-row-added-polling.mjs
Updated version fields: new-comment 0.1.1 → 0.1.2; new-row-added 0.2.1 → 0.2.2; new-updates 0.3.1 → 0.3.2; new-worksheet 0.2.1 → 0.2.2; new-row-added-polling 0.1.1 → 0.1.2.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor U as User / External Event
  participant S as HTTP-based Sheet Source
  participant D as drive.mjs (methods)
  participant GS as googleSheets
  participant GAPI as Google Drive/Sheets API

  U->>S: activateHook(channelID)
  alt watchDrive = true
    S->>D: getDriveId(watchedDrive)
    D->>GAPI: Resolve Drive ID
    GAPI-->>D: Drive ID
    S->>GS: activateHook(channelID, driveId)
  else watchDrive = false
    S->>GS: activateFileHook(channelID, sheetId)
  end
  GS->>GAPI: Create/verify webhook
  GAPI-->>GS: Hook activated
  GS-->>S: Activation result
Loading
sequenceDiagram
  autonumber
  participant Timer as Timer
  participant S as HTTP-based Sheet Source
  participant D as drive.mjs
  participant GS as googleSheets
  participant GAPI as Google Drive/Sheets API

  Timer->>S: run(timer event)
  alt watchDrive = true
    S->>D: renewDriveSubscription()
    D->>GAPI: Renew drive subscription / list changes
    GAPI-->>D: Changes, new token
    D-->>S: Updated channel / token
  else
    S->>GS: renewSubscription()
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Poem

I hop through code with whiskers bright,
Merged methods, tokens held tight.
Hooks rerouted, versions new,
I stamp my paw and say "review!" 🥕

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The pull request description is too brief and does not follow the repository’s required template, lacking the "## WHY" section and a clear explanation of the motivation behind the changes, making it incomplete against the specified structure. Please update the description to include a "## WHY" section that outlines the rationale and benefits of switching to watching the drive instead of a single file to meet the repository’s template requirements.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The pull request title succinctly describes the primary change by stating that Google Sheets sources will now watch the drive instead of a specific file, directly reflecting the main update implemented in the code; it is clear, concise, and focused on the core enhancement.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

luancazarine
luancazarine previously approved these changes Oct 3, 2025
Copy link
Collaborator

@luancazarine luancazarine left a 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!

@luancazarine luancazarine moved this from In Review to Ready for QA in Component (Source and Action) Backlog Oct 3, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d275fd7 and 28f4310.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (4)
  • components/google_sheets/sources/common/http-based/base.mjs (1 hunks)
  • components/google_sheets/sources/common/http-based/drive.mjs (1 hunks)
  • components/google_sheets/sources/common/http-based/sheet.mjs (4 hunks)
  • components/google_sheets/sources/new-row-added-polling/new-row-added-polling.mjs (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • components/google_sheets/sources/new-row-added-polling/new-row-added-polling.mjs
🧰 Additional context used
🧬 Code graph analysis (1)
components/google_sheets/sources/common/http-based/sheet.mjs (2)
components/google_sheets/sources/common/http-based/base.mjs (4)
  • channelID (78-78)
  • channelID (80-84)
  • channelID (101-101)
  • subscription (102-102)
components/google_sheets/sources/common/http-based/drive.mjs (8)
  • channelID (39-47)
  • channelID (79-79)
  • channelID (104-104)
  • pageToken (84-84)
  • newStartPageToken (57-60)
  • subscription (78-78)
  • subscription (103-103)
  • subscription (106-117)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Lint Code Base

@vunguyenhung vunguyenhung moved this from Ready for QA to In QA in Component (Source and Action) Backlog Oct 6, 2025
@vunguyenhung vunguyenhung moved this from In QA to Ready for Release in Component (Source and Action) Backlog Oct 6, 2025
@vunguyenhung
Copy link
Collaborator

Hi everyone, all test cases are passed! Ready for release!

Test report
https://vunguyenhung.notion.site/Google-Sheets-watch-drive-instead-of-file-281bf548bb5e8102acd0f1f4bde418d2

@michelle0927
Copy link
Collaborator Author

/approve

@michelle0927 michelle0927 merged commit d268b9a into master Oct 6, 2025
10 checks passed
@michelle0927 michelle0927 deleted the google-sheets-source-updates branch October 6, 2025 15:17
@github-project-automation github-project-automation bot moved this from Ready for Release to Done in Component (Source and Action) Backlog Oct 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants