Skip to content

Conversation

michelle0927
Copy link
Collaborator

@michelle0927 michelle0927 commented Sep 17, 2025

Resolves #18392

Summary by CodeRabbit

  • Bug Fixes

    • Improved reliability of the HubSpot “List Forms” action, ensuring results are aggregated correctly across pages without unintended mutations.
    • Corrected the reported form count for more accurate summaries.
  • Chores

    • Bumped HubSpot “List Forms” action version to 0.0.8.
    • Updated HubSpot package version to 1.7.6.

Copy link

vercel bot commented Sep 17, 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 Sep 17, 2025 6:27pm
pipedream-docs-redirect-do-not-edit Ignored Ignored Sep 17, 2025 6:27pm

Copy link
Contributor

coderabbitai bot commented Sep 17, 2025

Walkthrough

The HubSpot list-forms action now uses a local accumulator to collect paginated results and returns that array, updating its version to 0.0.8. The package version for the HubSpot component is bumped to 1.7.6.

Changes

Cohort / File(s) Summary
HubSpot Forms Action Logic
`components/hubspot/actions/list-forms/list-forms.mjs`
Switched from mutating API results to aggregating into a local `forms` array across pages; updated summary to use `forms.length`; returned `forms`; version bump 0.0.7 → 0.0.8.
Package Version Bump
`components/hubspot/package.json`
Bumped package version 1.7.5 → 1.7.6; no other changes.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor U as User
  participant A as ListForms Action
  participant H as HubSpot Forms API

  U->>A: Invoke list-forms
  A->>H: GET /forms?page=1
  H-->>A: results[], paging
  note over A: Initialize local accumulator: forms = []
  loop For each page
    A->>A: Append page results to forms
    A->>H: GET next page (if paging)
    H-->>A: results[], paging
  end
  A-->>U: Return forms (aggregated)
  note over A,U: Summary uses forms.length
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I hop through pages, one by one,
Collecting forms till work is done.
No more empty paws or sighs—
A tidy basket, growing in size.
Version bumped, carrots raised high—
Forms abound! A bug goodbye. 🥕✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The PR description contains only "Resolves #18392" and does not follow the repository's required description template which expects a "## WHY" section. It lacks an explanation of the root cause, a summary of the code changes, and any test or verification steps that demonstrate the fix. Because the required contextual information is missing, the description is incomplete and should be expanded before merging. Please update the PR description to follow the repository template by adding a "## WHY" section that explains the root cause and the behavioral change introduced. Include a brief summary of the files changed, the approach taken to fix the bug, the linked issue number, and the tests or verification steps used to confirm the fix. Also note the package version bump and any changelog or release notes if applicable.
✅ Passed checks (4 passed)
Check name Status Explanation
Title Check ✅ Passed The title "Hubspot - bug fix to list-forms action" succinctly identifies the primary change as a bug fix to the Hubspot list-forms action. It is concise, a single sentence, and directly matches the modifications in components/hubspot/actions/list-forms/list-forms.mjs that adjust how API results are accumulated and returned. This phrasing is specific enough for a teammate scanning the PR history to understand the main purpose of the change.
Linked Issues Check ✅ Passed Issue #18392 reports that the Hubspot "list forms" action always returns an empty list and requests a code fix. The change in components/hubspot/actions/list-forms/list-forms.mjs introduces a local "forms" accumulator, appends API page items into it instead of mutating the API-provided results array, and returns "forms", which directly targets the described failure mode. Based on the provided summaries, these code changes satisfy the linked issue's primary coding objective.
Out of Scope Changes Check ✅ Passed The raw summary shows modifications limited to components/hubspot/actions/list-forms/list-forms.mjs and components/hubspot/package.json. Both edits are directly related to the bug fix: the first implements the behavioral fix and the second bumps the package version. There are no other modified files listed that would indicate unrelated or out-of-scope changes.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch issue-18392

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.

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: 0

🧹 Nitpick comments (3)
components/hubspot/actions/list-forms/list-forms.mjs (3)

27-33: Good fix: local accumulator resolves empty-list bug; tighten params construction.
Avoid sending undefined query params.

Apply:

-    const forms = [];
+    const forms = [];
@@
-    const params = {
-      archived: this.archived,
-    };
+    const params = {};
+    if (this.archived !== undefined) params.archived = this.archived;

Optional (verify HubSpot max page size): set per-page limit to reduce requests.

     do {
+      // Page-size hint; verify max allowed by API (often 100)
+      params.limit = Math.min(this.maxResults - count, 100);
       const {
         paging, results,
       } = await this.hubspot.listMarketingForms({
         $,
         params,
       });

Would you confirm the max allowed limit for the Forms API and adjust the 100 if needed?


45-51: Simplify accumulation and avoid per-item counting.
Push a sliced batch instead of looping.

Apply:

-      for (const item of results) {
-        forms.push(item);
-        count++;
-        if (count >= this.maxResults) {
-          break;
-        }
-      }
+      const remaining = this.maxResults - count;
+      const take = Math.min(results.length, remaining);
+      forms.push(...results.slice(0, take));
+      count += take;

52-54: Guard optional chaining on next and only set after when present.
Prevents potential TypeError if paging exists without next, and avoids sending after=undefined.

Apply:

-      hasMore = paging?.next.after;
-      params.after = paging?.next.after;
-    } while (hasMore && count < this.maxResults);
+      const nextAfter = paging?.next?.after;
+      if (nextAfter) params.after = nextAfter;
+      else delete params.after;
+    } while (params.after && count < this.maxResults);

Optional: rename hasMorenextAfter for clarity throughout.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 69eb39d and 281c69c.

📒 Files selected for processing (2)
  • components/hubspot/actions/list-forms/list-forms.mjs (4 hunks)
  • components/hubspot/package.json (1 hunks)
⏰ 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). (4)
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Lint Code Base
  • GitHub Check: pnpm publish
🔇 Additional comments (4)
components/hubspot/package.json (1)

3-3: Version bump aligned with action changes — LGTM.
No other fields changed; this matches the action’s 0.0.8 bump.

components/hubspot/actions/list-forms/list-forms.mjs (3)

8-8: Action version bump is appropriate.
Matches the package bump; no concerns.


58-60: Nice summary UX.
Pluralization logic is correct.


62-62: Return value is correct.
Returning forms matches the new accumulator.

@vunguyenhung vunguyenhung merged commit a8d8b68 into master Sep 18, 2025
10 checks passed
@vunguyenhung vunguyenhung deleted the issue-18392 branch September 18, 2025 02:48
sergio-eliot-rodriguez pushed a commit to sergio-eliot-rodriguez/sergio_wong_does_pipedream that referenced this pull request Sep 21, 2025
vunguyenhung added a commit that referenced this pull request Sep 24, 2025
* Leonardo AI components

* added unzoom image action

* fixing link errors

* more lint fixes

* Merging pull request #18359

* fix: pagination prop and params struct

* fix: no need for paginate here

* chore: update version

* chore: cleanup

* chore: update package

* feat: allow raw response

* chore: bump package

* fix: buffer response instead

* Update components/google_drive/actions/download-file/download-file.mjs

Co-authored-by: Jorge Cortes <jacortesmahmud@gmail.com>

* versions

* pnpm-lock.yaml

* pnpm-lock.yaml

* pnpm-lock.yaml

* feat: add content selector

* chore: bump package

* fix: comments

* chore: bump versions

* chore: fix versions

* fixes: QA fixes

* feat: add cursor to req

* package.json

---------

Co-authored-by: joao <joao@coform.com>
Co-authored-by: joaocoform <joao@usecoform.com>
Co-authored-by: Jorge Cortes <jacortesmahmud@gmail.com>
Co-authored-by: Michelle Bergeron <michelle.bergeron@gmail.com>
Co-authored-by: Luan Cazarine <luanhc@gmail.com>

* Merging pull request #18361

* update siteId prop

* pnpm-lock.yaml

* package.json version

* Google Sheets - update row refresh fields  (#18369)

* change prop order and refresh fields

* bump package.json

* Pipedrive - fix app name (#18370)

* use pipedriveApp instead of app

* bump package.json

* Pipedrive - pipelineId integer (#18372)

* pipelineId - integer

* bump versions

* Adding app scaffolding for lightspeed_ecom_c_series

* Adding app scaffolding for financial_data

* Adding app scaffolding for microsoft_authenticator

* Merging pull request #18345

* updates

* versions

* versions

* Merging pull request #18368

* updates

* remove console.log

* versions

* Coinbase Developer Platform - New Wallet Event (#18342)

* new component

* pnpm-lock.yaml

* updates

* updates

* Hubspot - update search-crm (#18360)

* update search-crm

* limit results to one page

* update version

* package.json version

* Merging pull request #18347

* widget props

* fix version

* Adding app scaffolding for rundeck

* Merging pull request #18378

* Update Taiga component with new actions and sources

- Bump version to 0.1.0 in package.json and add dependency on @pipedream/platform.
- Introduce new actions for creating, updating, and deleting issues, tasks, and user stories.
- Add sources for tracking changes and deletions of issues and tasks.
- Implement utility functions for parsing and cleaning objects in common/utils.mjs.
- Enhance prop definitions for better integration with Taiga API.

* pnpm update

* Refactor Taiga actions to utilize parseObject utility

- Added parseObject utility for tags, watchers, and points in update-issue, update-task, and update-userstory actions.
- Removed the update-project action as it is no longer needed.
- Enhanced base source to include secret key validation for webhook security.

* Merging pull request #18382

* add testSources prop

* pnpm-lock.yaml

* fix

* Merging pull request #18323

* Added actions

* Added actions

* Added actions

* Merging pull request #18377

* Added actions

* Update components/weaviate/actions/create-class/create-class.mjs

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: Luan Cazarine <luanhc@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Merging pull request #18376

* Adding app scaffolding for etrusted

* Adding app scaffolding for intelliflo_office

* Adding app scaffolding for thoughtspot

* Adding app scaffolding for kordiam

* Adding app scaffolding for ticketsauce

* trustpilot fixes (#18152)

* trustpilot fixes

* more fixes

* update versions

* more version updates

* fixes

* Bump all Trustpilot actions to version 0.1.0

Major improvements and API updates across all actions:
- Enhanced private API support with proper authentication
- Improved parameter handling and validation
- Better error handling and response structures
- Added new conversation flow for product reviews
- Fixed endpoint URLs to match latest API documentation
- Streamlined request/response processing

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* up version and clean up sources

* merge

* fix business ID

* delete temp action

* Update components/trustpilot/sources/new-product-reviews/new-product-reviews.mjs

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update components/trustpilot/sources/new-product-reviews/new-product-reviews.mjs

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update components/trustpilot/sources/new-product-reviews/new-product-reviews.mjs

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update components/trustpilot/sources/new-service-reviews/new-service-reviews.mjs

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* comments

* Pagination

* fixes

* comments

* missed some `$`'s

* unduplicated

* more fixes

* final comments

* more comments

* .

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Adding app scaffolding for peekalink

* 18314 twilio (#18350)

* Update Twilio component versions and dependencies

- Update Twilio Send Message action adding detailed description for 'from' prop and refactoring phone number validation logic.
- Incremented action versions for several Twilio actions.

* pnpm update

* Updating LinkedIn API version (#18399)

* Merging pull request #18394

* Databricks API - Jobs action components (#18371)

* Notion property building improvements (#18381)

* validate property types

* versions

* Google Business - add debug log (#18407)

* add debug log

* bump versions

* Notion API Key - update @pipedream/notion version (#18409)

* update @pipedream/notion dependency version

* pnpm-lock.yaml

* Adding app scaffolding for reduct_video

* Adding app scaffolding for shopware

* Adding app scaffolding for instamojo

* Hubspot - bug fix to sources w/ property changes (#18379)

* updates

* versions

* Google sheets type fix (#18411)

* Fixing worksheetId prop type from string to integer

* Version bumps

---------

Co-authored-by: Leo Vu <vunguyenhung@outlook.com>

* Merging pull request #18393

* new components

* remove console.log

* versions

* update

* Merging pull request #18408

* 403 error message

* versions

* update

* Merging pull request #18419

* Changes per PR Review

* Removes leonardo_ai_actions.mdc not indented for merging

* synced lockfile after install

* fully lock form-data for leonardo_ai

* conflict solving

* lint fixes

* Chipped down Readme, implemented async options in gen motion

---------

Co-authored-by: jocarino <45713006+jocarino@users.noreply.github.com>
Co-authored-by: joao <joao@coform.com>
Co-authored-by: joaocoform <joao@usecoform.com>
Co-authored-by: Jorge Cortes <jacortesmahmud@gmail.com>
Co-authored-by: Michelle Bergeron <michelle.bergeron@gmail.com>
Co-authored-by: Luan Cazarine <luanhc@gmail.com>
Co-authored-by: michelle0927 <michelle0927@users.noreply.github.com>
Co-authored-by: Andrew Chuang <andrewjschuang@gmail.com>
Co-authored-by: danhsiung <35384182+danhsiung@users.noreply.github.com>
Co-authored-by: Lucas Caresia <lucascarezia@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Job <9075380+Afstkla@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Guilherme Falcão <48412907+GTFalcao@users.noreply.github.com>
Co-authored-by: Leo Vu <vunguyenhung@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] "list forms" in Hubspot always returns empty list
3 participants