Skip to content

Conversation

@luancazarine
Copy link
Collaborator

@luancazarine luancazarine commented Nov 20, 2025

Resolves #13377

Summary by CodeRabbit

  • New Features

    • Encharge: added actions (Add/Update Person, Archive Person, Remove Tags), sources (New Person, Updated Person, Tag Removed) with test-event samples and a webhook base handling activation/deactivation.
    • Encharge app: full API wrapper (get/list/addOrUpdate/archive/removeTag/create/delete hooks), dynamic user/tag props, parseObject utility and LIMIT constant.
  • Chores

    • Bumped Encharge package version to 0.1.0 and added platform dependency.

✏️ Tip: You can customize this high-level summary in your review settings.

- Added actions for adding/updating a person, archiving a person, and removing tags.
- Introduced new sources for detecting new and updated persons, as well as when tags are removed.
- Updated prop definitions to include user ID and tags for better integration.
- Implemented utility functions for parsing objects and managing API requests.
- Bumped version to 0.1.0 and added dependencies for improved functionality.
@luancazarine luancazarine linked an issue Nov 20, 2025 that may be closed by this pull request
@vercel
Copy link

vercel bot commented Nov 20, 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 Nov 25, 2025 3:58pm
pipedream-docs-redirect-do-not-edit Ignored Ignored Nov 25, 2025 3:58pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 20, 2025

Walkthrough

Adds a full Encharge integration: API app wrapper, utilities/constants, webhook lifecycle base, three instant webhook sources with test events, three actions (add/update, archive, remove-tags), package metadata bump, and minor trailing-newline fixes across unrelated components.

Changes

Cohort / File(s) Change Summary
App core
components/encharge/encharge.app.mjs
Implements API wrapper (_apiUrl, _getHeaders, _makeRequest) and concrete methods: getPerson, listPeople, addOrUpdatePerson, archivePerson, removeTag, createHook, deleteHook; adds dynamic propDefinitions for userId and tags.
Actions
components/encharge/actions/add-or-update-person/add-or-update-person.mjs, components/encharge/actions/archive-person/archive-person.mjs, components/encharge/actions/remove-tags/remove-tags.mjs
Adds three actions: add-or-update-person (builds payload, calls addOrUpdatePerson), archive-person (enforces XOR of userId/email, calls archivePerson), remove-tags (parses tags, calls removeTag); each exports summary and returns the API response.
Sources base
components/encharge/sources/common/base.mjs
New shared source base with props (encharge, db, http), webhook lifecycle (activate → createHook + store id, deactivate → read id + deleteHook), _setWebhookId/_getWebhookId helpers, and run({ body }) to emit events.
Sources (instant)
components/encharge/sources/new-person-instant/..., components/encharge/sources/updated-person-instant/..., components/encharge/sources/tag-removed-from-person-instant/...
Adds three instant sources extending common base: new-person-instant (newUser), updated-person-instant (updatedUser), tag-removed-from-person-instant (dynamic event using tagId); each supplies getEvent, generateMeta, and sampleEmit.
Source test events
components/encharge/sources/*/test-event.mjs
Adds sample/test event payloads for new/updated/tag-removed sources to support sample emits and testing.
Utilities & constants
components/encharge/common/utils.mjs, components/encharge/common/constants.mjs
Adds parseObject(obj) utility (error-tolerant JSON parsing for strings/arrays) and exports LIMIT = 100.
Package
components/encharge/package.json
Bumps version to 0.1.0 and adds dependency "@pipedream/platform": "^3.1.1".
Misc (formatting)
components/*/*.app.mjs
Multiple components received trailing-newline-only changes (no behavioral edits).

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Source
    participant Base
    participant App
    participant Encharge
    participant DB

    User->>Source: Activate source
    Source->>Base: activate()
    Base->>App: createHook(endpoint, eventType)
    App->>Encharge: POST /hooks
    Encharge-->>App: { subscriptionId }
    Base->>DB: _setWebhookId(subscriptionId)

    Encharge->>Base: Webhook POST (body)
    Base->>Source: run({ body })
    Source->>Source: generateMeta(body)
    Source-->>User: emit(body + metadata)

    User->>Source: Deactivate source
    Source->>Base: deactivate()
    Base->>DB: _getWebhookId()
    Base->>App: deleteHook(subscriptionId)
    App->>Encharge: DELETE /hooks/{id}
Loading
sequenceDiagram
    participant Caller
    participant Action
    participant App
    participant Encharge

    Caller->>Action: Invoke action with props
    Action->>Action: Parse & validate inputs
    alt add-or-update-person
        Action->>App: addOrUpdatePerson({ data })
    else archive-person
        Action->>Action: require XOR(userId, email)
        Action->>App: archivePerson({ params })
    else remove-tags
        Action->>Action: parse tags → CSV
        Action->>App: removeTag({ data })
    end
    App->>Encharge: API request
    Encharge-->>App: response
    Action-->>Caller: return response + summary
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Areas needing extra attention:
    • components/encharge/encharge.app.mjs: HTTP request construction, header/auth handling, error/status handling, and pagination (if applicable).
    • components/encharge/sources/common/base.mjs: webhook lifecycle correctness, DB key naming, and edge cases during activate/deactivate.
    • components/encharge/actions/archive-person/archive-person.mjs: XOR validation logic and error messages.
    • components/encharge/actions/remove-tags/remove-tags.mjs and components/encharge/common/utils.mjs: parseObject behavior and tag normalization.

Suggested labels

ai-assisted

Suggested reviewers

  • jcortes

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings, 1 inconclusive)
Check name Status Explanation Resolution
Description check ⚠️ Warning The description only states 'Resolves #13377' without explaining the changes, implementation approach, or context required to understand the pull request. Expand the description to include a summary of what was implemented, key changes made, and why these changes were needed, following the repository's description template guidelines.
Out of Scope Changes check ⚠️ Warning The PR includes trailing newline additions to 17 unrelated .app.mjs files across different components (apiframe, brand_dev, contentdrips, cursor, emailchef, etc.), which are not required by the Encharge issue and represent scope creep. Remove trailing newline changes from all unrelated component files and focus only on Encharge components or submit formatting changes as a separate PR.
Title check ❓ Inconclusive The title '13377 components encharge' is vague and merely references an issue number; it does not clearly describe the main change being introduced to the codebase. Revise the title to clearly describe the primary change, such as 'Add Encharge integration with sources and actions' or 'Implement Encharge components (sources and actions)'.
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR successfully implements all three sources (new-person-instant, tag-removed-from-person-instant, updated-person-instant) and all three actions (archive-person, remove-tag, add-or-update-person) specified in issue #13377.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 13377-components-encharge

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c1c302a and 94da582.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (15)
  • components/apiframe/apiframe.app.mjs (1 hunks)
  • components/brand_dev/brand_dev.app.mjs (1 hunks)
  • components/contentdrips/contentdrips.app.mjs (1 hunks)
  • components/cursor/cursor.app.mjs (1 hunks)
  • components/emailchef/emailchef.app.mjs (1 hunks)
  • components/fynk/fynk.app.mjs (1 hunks)
  • components/helicone/helicone.app.mjs (1 hunks)
  • components/iplocate/iplocate.app.mjs (1 hunks)
  • components/magicalapi/magicalapi.app.mjs (1 hunks)
  • components/relationcity/relationcity.app.mjs (1 hunks)
  • components/shortpen/shortpen.app.mjs (1 hunks)
  • components/socket/socket.app.mjs (1 hunks)
  • components/turbosmtp/turbosmtp.app.mjs (1 hunks)
  • components/validemail/validemail.app.mjs (1 hunks)
  • components/veryfi/veryfi.app.mjs (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-10-20T01:01:02.970Z
Learnt from: js07
Repo: PipedreamHQ/pipedream PR: 18744
File: components/slack_v2/actions/send-large-message/send-large-message.mjs:49-64
Timestamp: 2025-10-20T01:01:02.970Z
Learning: In components/slack_v2/actions/send-large-message/send-large-message.mjs, the metadata_event_payload prop is typed as string, so the code only needs to handle string-to-JSON parsing and does not need to handle object inputs.

Applied to files:

  • components/emailchef/emailchef.app.mjs
⏰ 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: pnpm publish
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Lint Code Base
  • GitHub Check: Verify TypeScript components
🔇 Additional comments (14)
components/magicalapi/magicalapi.app.mjs (1)

11-11: Minor formatting: trailing newline added.

This is a stylistic fix with no functional impact. The trailing newline conforms to common end-of-file conventions.

components/iplocate/iplocate.app.mjs (1)

11-11: LGTM!

Adding a trailing newline at end-of-file is a standard formatting best practice and aligns with common linting conventions.

components/emailchef/emailchef.app.mjs (1)

11-11: Trailing newline addition appears unrelated to PR objectives.

This file only gains a trailing newline with no functional changes. While trailing newlines are generally good practice, this change appears incidental to the Encharge integration work described in the PR objectives. Verify that this change is intentional and aligns with project formatting standards—most projects handle trailing whitespace via formatters (e.g., Prettier) rather than manual edits.

components/validemail/validemail.app.mjs (1)

11-11: Minor: trailing newline addition outside PR scope.

This is a formatting fix adding a trailing newline to align with file conventions. While acceptable, it's outside the primary Encharge integration objectives. If this is part of a broader linting cleanup across the PR, it's fine to keep; otherwise, consider reverting to minimize unrelated changes.

components/apiframe/apiframe.app.mjs (1)

1-11: LGTM!

The trailing newline addition is a standard file hygiene improvement with no impact on logic or behavior.

components/brand_dev/brand_dev.app.mjs (1)

11-11: Good formatting hygiene.

Adding a trailing newline aligns with standard linting practices and improves consistency across the codebase.

components/contentdrips/contentdrips.app.mjs (1)

11-11: Unrelated file modified in Encharge PR.

This file (contentdrips.app.mjs) is unrelated to the Encharge integration objectives. The only change is a trailing newline adjustment on line 11, which appears to be incidental formatting cleanup. The change is benign and does not affect functionality.

components/socket/socket.app.mjs (1)

11-11: Formatting change only — trailing newline added.

This is a minor formatting adjustment with no functional impact. The Socket app configuration remains unchanged.

components/fynk/fynk.app.mjs (1)

11-11: Trailing newline addition looks good.

This formatting change ensures consistent file endings across the codebase.

components/helicone/helicone.app.mjs (1)

1-11: LGTM!

The Helicone app definition is properly structured. The trailing newline addition is a minor cleanup that aligns with common code formatting standards.

components/veryfi/veryfi.app.mjs (1)

11-11: File unrelated to PR objectives.

This Veryfi component file appears incidental to the PR, which focuses on adding Encharge integration components. The only change is a trailing newline addition (formatting). Verify this change is intentional or consider removing it to keep the PR focused.

components/turbosmtp/turbosmtp.app.mjs (1)

1-11: LGTM!

No concerns with this file.

components/shortpen/shortpen.app.mjs (1)

11-11: Minor formatting cleanup outside PR scope.

This trailing newline addition is a cosmetic fix unrelated to the Encharge integration work. While it's a standard practice and does not affect functionality, it falls outside the stated PR objectives.

components/relationcity/relationcity.app.mjs (1)

1-11: No actionable changes.

This file contains only a trailing newline addition, which is a trivial formatting change with no functional impact to the relationcity app definition.

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


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

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6f9a2f5 and 2aa0c23.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (14)
  • components/encharge/actions/add-or-update-person/add-or-update-person.mjs (1 hunks)
  • components/encharge/actions/archive-person/archive-person.mjs (1 hunks)
  • components/encharge/actions/remove-tags/remove-tags.mjs (1 hunks)
  • components/encharge/common/constants.mjs (1 hunks)
  • components/encharge/common/utils.mjs (1 hunks)
  • components/encharge/encharge.app.mjs (1 hunks)
  • components/encharge/package.json (2 hunks)
  • components/encharge/sources/common/base.mjs (1 hunks)
  • components/encharge/sources/new-person-instant/new-person-instant.mjs (1 hunks)
  • components/encharge/sources/new-person-instant/test-event.mjs (1 hunks)
  • components/encharge/sources/tag-removed-from-person-instant/tag-removed-from-person-instant.mjs (1 hunks)
  • components/encharge/sources/tag-removed-from-person-instant/test-event.mjs (1 hunks)
  • components/encharge/sources/updated-person-instant/test-event.mjs (1 hunks)
  • components/encharge/sources/updated-person-instant/updated-person-instant.mjs (1 hunks)
🧰 Additional context used
🧠 Learnings (6)
📚 Learning: 2024-10-10T19:18:27.998Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 14265
File: components/the_magic_drip/sources/common.mjs:35-43
Timestamp: 2024-10-10T19:18:27.998Z
Learning: In `components/the_magic_drip/sources/common.mjs`, when processing items in `getAndProcessData`, `savedIds` is intentionally updated with IDs of both emitted and non-emitted items to avoid emitting retroactive events upon first deployment and ensure only new events are emitted as they occur.

Applied to files:

  • components/encharge/sources/updated-person-instant/updated-person-instant.mjs
  • components/encharge/sources/new-person-instant/new-person-instant.mjs
  • components/encharge/sources/tag-removed-from-person-instant/tag-removed-from-person-instant.mjs
📚 Learning: 2025-10-20T01:01:02.970Z
Learnt from: js07
Repo: PipedreamHQ/pipedream PR: 18744
File: components/slack_v2/actions/send-large-message/send-large-message.mjs:49-64
Timestamp: 2025-10-20T01:01:02.970Z
Learning: In components/slack_v2/actions/send-large-message/send-large-message.mjs, the metadata_event_payload prop is typed as string, so the code only needs to handle string-to-JSON parsing and does not need to handle object inputs.

Applied to files:

  • components/encharge/sources/updated-person-instant/test-event.mjs
📚 Learning: 2025-06-04T17:52:05.780Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 16954
File: components/salesloft/salesloft.app.mjs:14-23
Timestamp: 2025-06-04T17:52:05.780Z
Learning: In the Salesloft API integration (components/salesloft/salesloft.app.mjs), the _makeRequest method returns response.data which directly contains arrays for list endpoints like listPeople, listCadences, listUsers, and listAccounts. The propDefinitions correctly call .map() directly on these responses without needing to destructure a nested data property.

Applied to files:

  • components/encharge/encharge.app.mjs
📚 Learning: 2025-09-15T22:01:11.472Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 18362
File: components/leonardo_ai/actions/generate-image/generate-image.mjs:103-105
Timestamp: 2025-09-15T22:01:11.472Z
Learning: In Pipedream components, pipedream/platform's axios implementation automatically excludes undefined values from HTTP requests, so there's no need to manually check for truthiness before including properties in request payloads.

Applied to files:

  • components/encharge/encharge.app.mjs
📚 Learning: 2024-12-12T19:23:09.039Z
Learnt from: jcortes
Repo: PipedreamHQ/pipedream PR: 14935
File: components/sailpoint/package.json:15-18
Timestamp: 2024-12-12T19:23:09.039Z
Learning: When developing Pipedream components, do not add built-in Node.js modules like `fs` to `package.json` dependencies, as they are native modules provided by the Node.js runtime.

Applied to files:

  • components/encharge/package.json
📚 Learning: 2024-07-24T02:06:47.016Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 12697
File: components/salesforce_rest_api/sources/common-webhook-methods.mjs:1-71
Timestamp: 2024-07-24T02:06:47.016Z
Learning: The `common-webhook-methods.mjs` object is designed to be extended, similar to an abstract class, and intentionally does not implement certain methods like `generateWebhookMeta` and `getEventType` to enforce implementation in subclasses.

Applied to files:

  • components/encharge/sources/common/base.mjs
🧬 Code graph analysis (8)
components/encharge/common/constants.mjs (1)
components/encharge/encharge.app.mjs (1)
  • LIMIT (13-18)
components/encharge/common/utils.mjs (1)
components/plentyone/common/utils.mjs (1)
  • obj (1-24)
components/encharge/sources/updated-person-instant/updated-person-instant.mjs (1)
components/encharge/actions/add-or-update-person/add-or-update-person.mjs (1)
  • data (51-61)
components/encharge/actions/remove-tags/remove-tags.mjs (3)
components/encharge/actions/add-or-update-person/add-or-update-person.mjs (1)
  • response (63-66)
components/encharge/actions/archive-person/archive-person.mjs (1)
  • response (42-53)
components/encharge/common/utils.mjs (2)
  • parseObject (1-24)
  • parseObject (1-24)
components/encharge/sources/new-person-instant/new-person-instant.mjs (1)
components/encharge/actions/add-or-update-person/add-or-update-person.mjs (1)
  • data (51-61)
components/encharge/encharge.app.mjs (1)
components/encharge/common/constants.mjs (2)
  • LIMIT (1-1)
  • LIMIT (1-1)
components/encharge/actions/archive-person/archive-person.mjs (2)
components/encharge/actions/add-or-update-person/add-or-update-person.mjs (1)
  • response (63-66)
components/encharge/actions/remove-tags/remove-tags.mjs (1)
  • response (35-41)
components/encharge/actions/add-or-update-person/add-or-update-person.mjs (3)
components/encharge/common/utils.mjs (2)
  • parseObject (1-24)
  • parseObject (1-24)
components/encharge/actions/archive-person/archive-person.mjs (1)
  • response (42-53)
components/encharge/actions/remove-tags/remove-tags.mjs (1)
  • response (35-41)
⏰ 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: Publish TypeScript components
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Lint Code Base
  • GitHub Check: pnpm publish
🔇 Additional comments (15)
components/encharge/common/constants.mjs (1)

1-1: LGTM!

Clean constant definition for pagination limit.

components/encharge/package.json (2)

3-3: LGTM!

Appropriate version bump from 0.0.2 to 0.1.0 for new feature additions.


15-16: LGTM!

Correct addition of @pipedream/platform dependency needed for axios integration.

components/encharge/sources/new-person-instant/test-event.mjs (1)

1-23: LGTM!

Well-structured test event payload with representative data for the new person webhook.

components/encharge/sources/tag-removed-from-person-instant/test-event.mjs (1)

1-11: LGTM!

Appropriate minimal test event structure for tag removal webhook.

components/encharge/encharge.app.mjs (4)

1-2: LGTM!

Correct imports for axios and the LIMIT constant.


7-29: LGTM!

Well-structured userId propDefinition with pagination and proper label formatting.


53-69: LGTM!

Clean API request wrapper implementation with proper URL construction and header injection.


70-115: LGTM!

Comprehensive set of API methods covering person management, tagging, and webhook lifecycle operations.

components/encharge/actions/archive-person/archive-person.mjs (1)

1-36: LGTM!

Clean action metadata and prop definitions with appropriate annotations including destructiveHint: true.

components/encharge/common/utils.mjs (1)

1-24: LGTM!

Robust parseObject utility with proper error handling and fallback logic. The implementation is identical to the pattern used in other Pipedream components (e.g., plentyone), which is acceptable for component-scoped utilities.

components/encharge/sources/updated-person-instant/updated-person-instant.mjs (1)

1-30: LGTM!

The source structure is clean and follows the established instant-source pattern correctly. The event type, metadata generation, and destructuring are all consistent with sibling sources.

components/encharge/sources/common/base.mjs (1)

1-35: LGTM!

The webhook lifecycle management is implemented correctly. The base module properly abstracts common behavior while leaving getEvent() and generateMeta() for subclasses to implement—this follows the established abstract base pattern for Pipedream sources.

Based on learnings

components/encharge/sources/new-person-instant/new-person-instant.mjs (1)

1-30: LGTM!

The implementation correctly follows the instant-source pattern and is consistent with the sibling sources in this PR.

components/encharge/actions/add-or-update-person/add-or-update-person.mjs (1)

56-56: Remove undefined property reference.

Line 56 references this.phone, but there is no phone prop defined in the props section (lines 15-48). This will include phone: undefined in the API request payload, which may cause unexpected behavior or errors.

Remove the undefined property:

     const data = [
       {
         firstName: this.firstName,
         lastName: this.lastName,
         email: this.email,
-        phone: this.phone,
         id: this.userId,
-        additionalFields: this.additionalFields,
         ...parsedAdditionalFields,
       },
     ];
⛔ Skipped due to learnings
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 18362
File: components/leonardo_ai/actions/generate-image/generate-image.mjs:103-105
Timestamp: 2025-09-15T22:01:11.472Z
Learning: In Pipedream components, pipedream/platform's axios implementation automatically excludes undefined values from HTTP requests, so there's no need to manually check for truthiness before including properties in request payloads.
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 16954
File: components/salesloft/salesloft.app.mjs:14-23
Timestamp: 2025-06-04T17:52:05.780Z
Learning: In the Salesloft API integration (components/salesloft/salesloft.app.mjs), the _makeRequest method returns response.data which directly contains arrays for list endpoints like listPeople, listCadences, listUsers, and listAccounts. The propDefinitions correctly call .map() directly on these responses without needing to destructure a nested data property.

…utput formatting

- Updated the return statement in the tags processing to use a ternary operator for clarity.
- Removed unused additionalFields from the add-or-update-person action.
- Enhanced the summary message in the add-or-update-person action to conditionally include the email.
- Added validation in the archive-person action to ensure either user ID or email is provided.
- Modified the remove-tags action to handle tags as an array for consistent processing.
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

♻️ Duplicate comments (1)
components/encharge/encharge.app.mjs (1)

48-50: Consider applying the readability improvement for tags parsing.

The tags parsing logic still uses the chained logical expression tags && tags.split(",") || [] which is less readable than a ternary operator. This was suggested in a previous review.

Apply this diff for improved readability:

-        return tags && tags.split(",") || [];
+        return tags ? tags.split(",") : [];
📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2aa0c23 and e8cc937.

📒 Files selected for processing (5)
  • components/encharge/actions/add-or-update-person/add-or-update-person.mjs (1 hunks)
  • components/encharge/actions/archive-person/archive-person.mjs (1 hunks)
  • components/encharge/actions/remove-tags/remove-tags.mjs (1 hunks)
  • components/encharge/encharge.app.mjs (1 hunks)
  • components/encharge/sources/tag-removed-from-person-instant/tag-removed-from-person-instant.mjs (1 hunks)
🧰 Additional context used
🧠 Learnings (5)
📚 Learning: 2024-10-08T15:33:38.240Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-10-08T15:33:38.240Z
Learning: When exporting a summary message in the `run` method of an action, ensure the message is correctly formatted. For example, in the `hackerone-get-members` action, the correct format is `Successfully retrieved ${response.data.length} members`.

Applied to files:

  • components/encharge/actions/add-or-update-person/add-or-update-person.mjs
📚 Learning: 2024-10-10T19:18:27.998Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 14265
File: components/the_magic_drip/sources/common.mjs:35-43
Timestamp: 2024-10-10T19:18:27.998Z
Learning: In `components/the_magic_drip/sources/common.mjs`, when processing items in `getAndProcessData`, `savedIds` is intentionally updated with IDs of both emitted and non-emitted items to avoid emitting retroactive events upon first deployment and ensure only new events are emitted as they occur.

Applied to files:

  • components/encharge/sources/tag-removed-from-person-instant/tag-removed-from-person-instant.mjs
📚 Learning: 2025-10-20T01:01:02.970Z
Learnt from: js07
Repo: PipedreamHQ/pipedream PR: 18744
File: components/slack_v2/actions/send-large-message/send-large-message.mjs:49-64
Timestamp: 2025-10-20T01:01:02.970Z
Learning: In components/slack_v2/actions/send-large-message/send-large-message.mjs, the metadata_event_payload prop is typed as string, so the code only needs to handle string-to-JSON parsing and does not need to handle object inputs.

Applied to files:

  • components/encharge/sources/tag-removed-from-person-instant/tag-removed-from-person-instant.mjs
📚 Learning: 2025-06-04T17:52:05.780Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 16954
File: components/salesloft/salesloft.app.mjs:14-23
Timestamp: 2025-06-04T17:52:05.780Z
Learning: In the Salesloft API integration (components/salesloft/salesloft.app.mjs), the _makeRequest method returns response.data which directly contains arrays for list endpoints like listPeople, listCadences, listUsers, and listAccounts. The propDefinitions correctly call .map() directly on these responses without needing to destructure a nested data property.

Applied to files:

  • components/encharge/encharge.app.mjs
📚 Learning: 2025-09-15T22:01:11.472Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 18362
File: components/leonardo_ai/actions/generate-image/generate-image.mjs:103-105
Timestamp: 2025-09-15T22:01:11.472Z
Learning: In Pipedream components, pipedream/platform's axios implementation automatically excludes undefined values from HTTP requests, so there's no need to manually check for truthiness before including properties in request payloads.

Applied to files:

  • components/encharge/encharge.app.mjs
🧬 Code graph analysis (4)
components/encharge/actions/add-or-update-person/add-or-update-person.mjs (2)
components/encharge/common/utils.mjs (2)
  • parseObject (1-24)
  • parseObject (1-24)
components/encharge/actions/archive-person/archive-person.mjs (1)
  • response (45-56)
components/encharge/actions/remove-tags/remove-tags.mjs (1)
components/encharge/common/utils.mjs (2)
  • parseObject (1-24)
  • parseObject (1-24)
components/encharge/actions/archive-person/archive-person.mjs (2)
components/encharge/actions/add-or-update-person/add-or-update-person.mjs (1)
  • response (62-65)
components/encharge/actions/remove-tags/remove-tags.mjs (1)
  • response (41-47)
components/encharge/encharge.app.mjs (1)
components/encharge/common/constants.mjs (2)
  • LIMIT (1-1)
  • LIMIT (1-1)
⏰ 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: pnpm publish
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Lint Code Base
🔇 Additional comments (3)
components/encharge/sources/tag-removed-from-person-instant/tag-removed-from-person-instant.mjs (1)

25-35: LGTM! Destructuring pattern correctly fixed.

The destructuring pattern on line 27 now correctly extracts the id property from the object ({ id }), resolving the previous issue where id would have been bound to the entire object. The metadata generation logic properly uses the extracted id value.

components/encharge/actions/archive-person/archive-person.mjs (1)

38-43: LGTM! Validation logic correctly handles all cases.

The validation now properly checks for both edge cases:

  • Lines 38-40: Ensures at least one identifier (userId or email) is provided
  • Lines 41-43: Ensures they are mutually exclusive

This resolves the previous critical validation gap.

components/encharge/actions/remove-tags/remove-tags.mjs (1)

35-40: LGTM! Type safety correctly implemented.

The code now properly handles the output of parseObject by normalizing it to an array (lines 36-40), ensuring that array methods like .join() and .length will work correctly regardless of the input type. This resolves the previous type safety concern.

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

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e8cc937 and c1c302a.

📒 Files selected for processing (1)
  • components/encharge/actions/add-or-update-person/add-or-update-person.mjs (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2024-10-08T15:33:38.240Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-10-08T15:33:38.240Z
Learning: When exporting a summary message in the `run` method of an action, ensure the message is correctly formatted. For example, in the `hackerone-get-members` action, the correct format is `Successfully retrieved ${response.data.length} members`.

Applied to files:

  • components/encharge/actions/add-or-update-person/add-or-update-person.mjs
📚 Learning: 2025-10-20T01:01:02.970Z
Learnt from: js07
Repo: PipedreamHQ/pipedream PR: 18744
File: components/slack_v2/actions/send-large-message/send-large-message.mjs:49-64
Timestamp: 2025-10-20T01:01:02.970Z
Learning: In components/slack_v2/actions/send-large-message/send-large-message.mjs, the metadata_event_payload prop is typed as string, so the code only needs to handle string-to-JSON parsing and does not need to handle object inputs.

Applied to files:

  • components/encharge/actions/add-or-update-person/add-or-update-person.mjs
🧬 Code graph analysis (1)
components/encharge/actions/add-or-update-person/add-or-update-person.mjs (3)
components/encharge/common/utils.mjs (2)
  • parseObject (1-24)
  • parseObject (1-24)
components/encharge/actions/archive-person/archive-person.mjs (1)
  • response (45-56)
components/encharge/actions/remove-tags/remove-tags.mjs (1)
  • response (41-47)
⏰ 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: pnpm publish
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Lint Code Base
  • GitHub Check: Verify TypeScript components
🔇 Additional comments (1)
components/encharge/actions/add-or-update-person/add-or-update-person.mjs (1)

49-72: LGTM! The run method implementation is correct.

The implementation properly:

  • Parses additionalFields with appropriate fallback
  • Constructs the data payload correctly
  • Uses the userId to determine add vs. update in the summary
  • Handles the optional email in the summary message (previously flagged issue is now resolved)

lcaresia
lcaresia previously approved these changes Nov 24, 2025
Copy link
Collaborator

@lcaresia lcaresia left a comment

Choose a reason for hiding this comment

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

LGTM!

@vunguyenhung
Copy link
Collaborator

For Integration QA:

@vunguyenhung
Copy link
Collaborator

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

Test reports

@luancazarine
Copy link
Collaborator Author

/approve

Copy link
Collaborator

@lcaresia lcaresia left a comment

Choose a reason for hiding this comment

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

LGTM!

@luancazarine luancazarine merged commit 8af1783 into master Nov 25, 2025
10 checks passed
@luancazarine luancazarine deleted the 13377-components-encharge branch November 25, 2025 17:39
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.

[Components] encharge

4 participants