-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Return additional data in HubSpot New Deal in Stage source #16582
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 ↗︎ |
WalkthroughThe changes update the HubSpot New Deal in Stage source to include owner details in emitted events. This is achieved by fetching and attaching owner information when available. The package version is incremented, and test event data is updated to reflect the new structure and properties. Changes
Sequence Diagram(s)sequenceDiagram
participant Trigger as New Deal in Stage Source
participant HubSpotAPI as HubSpot API
Trigger->>HubSpotAPI: Fetch deals with DEFAULT_DEAL_PROPERTIES
loop For each deal
alt Deal has hubspot_owner_id
Trigger->>HubSpotAPI: Fetch owner details by ownerId
HubSpotAPI-->>Trigger: Return owner details
Trigger->>Trigger: Attach owner details to deal
end
Trigger->>Trigger: Emit deal event (with owner details if available)
end
Assessment against linked issues
Suggested labels
Suggested reviewers
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/hubspot/sources/new-deal-in-stage/new-deal-in-stage.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/hubspot/sources/new-deal-in-stage/test-event.mjsOops! Something went wrong! :( ESLint: 8.57.1 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs ✨ 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:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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: 1
🧹 Nitpick comments (1)
components/hubspot/sources/new-deal-in-stage/test-event.mjs (1)
5-30: Test event data appropriately updatedThe test event data has been updated to include comprehensive owner information and additional deal properties, which aligns well with the enhanced component functionality.
Note: The timestamps are set to future dates (May 2025). While this doesn't affect functionality, it might be better to use past or current dates for test data to avoid confusion.
Consider using timestamps in the past rather than the future for test data:
- "closedate": "2025-05-07T17:08:33.843Z", + "closedate": "2023-05-07T17:08:33.843Z", ... - "hs_lastmodifieddate": "2025-05-07T17:08:39.305Z", + "hs_lastmodifieddate": "2023-05-07T17:08:39.305Z", ... - "updatedAt": "2025-02-04T16:53:50.082Z", + "updatedAt": "2023-02-04T16:53:50.082Z", ... - "updatedAt": "2025-05-07T17:08:39.305Z", + "updatedAt": "2023-05-07T17:08:39.305Z",
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (3)
components/hubspot/package.json(1 hunks)components/hubspot/sources/new-deal-in-stage/new-deal-in-stage.mjs(4 hunks)components/hubspot/sources/new-deal-in-stage/test-event.mjs(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: pnpm publish
- GitHub Check: Verify TypeScript components
- GitHub Check: Publish TypeScript components
- GitHub Check: Lint Code Base
🔇 Additional comments (5)
components/hubspot/package.json (1)
3-3: Version increment looks appropriateThe minor version increment from 1.2.0 to 1.2.1 aligns with semantic versioning principles, as these changes add functionality (including owner details in emitted events) without breaking existing behavior.
components/hubspot/sources/new-deal-in-stage/new-deal-in-stage.mjs (4)
2-4: Appropriate import additionsThe added imports for
DEFAULT_DEAL_PROPERTIESandAPI_PATHare necessary for the new functionality to request specific deal properties and fetch owner details.
12-12: Component version increment is accurateThe version increment from 0.0.26 to 0.0.27 correctly reflects the enhancement made to return additional owner data in the emitted events.
84-84: Good use of predefined properties constantUsing
DEFAULT_DEAL_PROPERTIESensures consistency and maintainability when requesting deal data across the component.
121-126: Owner fetch implementation looks goodThe
getOwnermethod is well-implemented, concise, and follows the pattern of other API request methods in the codebase.
luancazarine
left a comment
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 #16573
Summary by CodeRabbit
New Features
Bug Fixes
Chores