Skip to content

Conversation

@andrewjschuang
Copy link
Contributor

@andrewjschuang andrewjschuang commented Sep 26, 2025

WHY

Summary by CodeRabbit

  • New Features

    • Added an optional “Max results” limit to pagination for ConnectWise PSA event sources, letting you cap how many items are processed per run. This helps manage throughput and reduce API load during large backlogs.
  • Chores

    • Incremented package and source versions to reflect the update. No behavioral changes beyond the new optional limit.

@vercel
Copy link

vercel bot commented Sep 26, 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 26, 2025 2:15pm
pipedream-docs-redirect-do-not-edit Ignored Ignored Sep 26, 2025 2:15pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 26, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Version increments across package and three sources. Added an optional max parameter to pagination in the common base processEvent, influencing result limiting and last-id handling. No other logic, dependencies, or exports changed.

Changes

Cohort / File(s) Summary
Package version bump
components/connectwise_psa/package.json
Version updated 0.2.0 → 0.2.1.
Source metadata version bumps
components/connectwise_psa/sources/new-contact-created/new-contact-created.mjs, components/connectwise_psa/sources/new-project-created/new-project-created.mjs, components/connectwise_psa/sources/new-ticket-created/new-ticket-created.mjs
Each source’s exported version updated 0.0.1 → 0.0.2; no behavioral changes.
Pagination option enhancement
components/connectwise_psa/sources/common/base.mjs
Added max to paginate call options in processEvent; subsequent slicing and last-id handling respect max when provided.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Trigger as Trigger/Timer/Webhook
  participant Source as Source (new-*-created)
  participant Base as Base.processEvent
  participant Pager as Paginator
  participant API as ConnectWise PSA API

  Trigger->>Source: invoke run()
  Source->>Base: processEvent(params, settings)
  Note over Base: Build paginate options<br/>Now supports optional "max"
  Base->>Pager: paginate(query, { lastId, pageSize, max? })
  Pager->>API: fetch pages until done or max reached
  API-->>Pager: batched results
  Pager-->>Base: aggregated results (≤ max if provided)
  Base-->>Source: sliced items + updated lastId
  Source-->>Trigger: emit events
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I twitch my whiskers, versions hop,
From 0.0.1 to .2—flip-flop!
A gentle cap: max on the page,
Keeps results tidy, sage-by-sage.
Thump of approval, tiny and bright—
Ship it quick, then moonlight bite. 🥕✨

✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch connectwise-psa-max-param

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2b5ab6f and 3f0b939.

📒 Files selected for processing (5)
  • components/connectwise_psa/package.json (1 hunks)
  • components/connectwise_psa/sources/common/base.mjs (1 hunks)
  • components/connectwise_psa/sources/new-contact-created/new-contact-created.mjs (1 hunks)
  • components/connectwise_psa/sources/new-project-created/new-project-created.mjs (1 hunks)
  • components/connectwise_psa/sources/new-ticket-created/new-ticket-created.mjs (1 hunks)

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.

@andrewjschuang andrewjschuang merged commit 89b584b into master Sep 26, 2025
6 of 10 checks passed
@andrewjschuang andrewjschuang deleted the connectwise-psa-max-param branch September 26, 2025 14:16
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.

2 participants