Skip to content

Conversation

luancazarine
Copy link
Collaborator

@luancazarine luancazarine commented Sep 19, 2025

Resolves #17945

Summary by CodeRabbit

  • New Features
    • ETrusted: Full API integration — paginated review retrieval with filters, review lookup, service ratings, total counts, reply management (save/delete), and veto create/retrieve actions.
    • ETrusted: Added input parsing utility and pagination limit constant.
  • Chores
    • ETrusted: Package version bumped and runtime dependency added.
  • Style
    • Minor formatting/EOF fixes in unrelated components.

- Introduced new actions for managing reviews, including creating, deleting, and replying to reviews, as well as retrieving review details and statistics.
- Added utility functions for parsing objects to enhance parameter handling.
- Updated eTrusted app version to 0.1.0 and included a new constants file for configuration limits.
- Enhanced prop definitions for better user input handling in actions.
@luancazarine luancazarine linked an issue Sep 19, 2025 that may be closed by this pull request
Copy link

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

Copy link
Contributor

coderabbitai bot commented Sep 19, 2025

Walkthrough

Adds a full ETrusted integration: core app implementation with HTTP helpers, pagination, utilities/constants, multiple review-related actions (list, minimal list, get by ID, service rating, totals, create/get veto, save/delete reply), package metadata update, and minor EOF newline fixes.

Changes

Cohort / File(s) Summary of Changes
ETrusted App Core & Pagination
components/etrusted/etrusted.app.mjs, components/etrusted/package.json
New ETrusted app implementation with propDefinitions, auth header/_makeRequest helpers, endpoint methods (channels, reviews, vetos, replies, counts), async paginate generator; package version bumped to 0.1.0 and dependency @pipedream/platform added.
ETrusted Common Utilities
components/etrusted/common/constants.mjs, components/etrusted/common/utils.mjs
Added LIMIT constant (500) and parseObject(obj) utility to normalize JSON-like strings/arrays and convert inputs.
Reviews Retrieval Actions
components/etrusted/actions/get-list-of-reviews/get-list-of-reviews.mjs, components/etrusted/actions/get-list-of-reviews-with-fewer-properties/get-list-of-reviews-with-fewer-properties.mjs, components/etrusted/actions/get-review-by-id/get-review-by-id.mjs, components/etrusted/actions/get-service-review-rating/get-service-review-rating.mjs, components/etrusted/actions/get-total-reviews/get-total-reviews.mjs
New actions to list reviews (paginated full and minimal), fetch review by ID, get service review rating by channel, and get total review counts; they use parseObject and paginate where applicable, export summaries, and return API responses.
Veto Operations Actions
components/etrusted/actions/create-veto-for-review/create-veto-for-review.mjs, components/etrusted/actions/get-review-veto-by-review-id/get-review-veto-by-review-id.mjs
New actions to create a veto for a review (comment, reason, optional reporter email) and to retrieve a veto by review ID; both call corresponding app methods, export summaries, and return API responses (get-veto includes error handling returning {} on failure).
Review Reply Actions
components/etrusted/actions/save-review-reply/save-review-reply.mjs, components/etrusted/actions/delete-review-reply/delete-review-reply.mjs
New actions to save a review reply (optional notification) and to delete a review reply; both delegate to app methods, export summaries, and return API responses.
Formatting-only
components/instamojo/instamojo.app.mjs, components/reduct_video/reduct_video.app.mjs, components/shopware/shopware.app.mjs
Trailing newline added to these files only; no functional or API changes.

Sequence Diagram(s)

sequenceDiagram
  participant Action as Action
  participant App as ETrusted App
  participant API as ETrusted API

  rect rgb(240,248,255)
  note over Action,App: Paginated listing flow (async generator)
  Action->>App: paginate(fn=getListOfReviews, params, maxResults)
  App->>API: GET /reviews?{filters, cursor, LIMIT}
  API-->>App: { items[], paging.cursor.after }
  App-->>Action: yield items (repeat until no cursor or maxResults reached)
  end
Loading
sequenceDiagram
  participant Action as Action
  participant App as ETrusted App
  participant API as ETrusted API

  rect rgb(245,255,240)
  note over Action,App: Create Veto
  Action->>App: createVetoForReview(reviewId, data)
  App->>API: POST /reviews/veto { reviewId, comment, reason, vetoReporterEmail }
  API-->>App: { id, ... }
  App-->>Action: response
  end

  rect rgb(255,250,240)
  note over Action,App: Get Veto
  Action->>App: getReviewVetoByReviewId(reviewId)
  App->>API: GET /reviews/veto/{reviewId}
  API-->>App: veto / error
  App-->>Action: response / {}
  end
Loading
sequenceDiagram
  participant Action as Action
  participant App as ETrusted App
  participant API as ETrusted API

  rect rgb(250,245,255)
  note over Action,App: Save Reply
  Action->>App: saveReviewReply(reviewId, { comment, sendNotification? })
  App->>API: POST /reviews/{reviewId}/reply
  API-->>App: reply
  App-->>Action: response
  end

  rect rgb(255,245,245)
  note over Action,App: Delete Reply
  Action->>App: deleteReviewReply(reviewId)
  App->>API: DELETE /reviews/{reviewId}/reply
  API-->>App: 204 / OK
  App-->>Action: response
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Suggested labels

User submitted

Suggested reviewers

  • andrewjschuang
  • GTFalcao

Poem

A rabbit tapped keys, nimble and bright,
I parsed strings and made paginate light.
Vetoes and replies now hop into line—
Reviews gathered neat, one API at a time.
Off I go, nose in the changelog, carrot in sight. 🐇✨

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings, 1 inconclusive)
Check name Status Explanation Resolution
Out of Scope Changes Check ⚠️ Warning The changes include formatting-only updates to unrelated components such as Instamojo, reduct_video, and Shopware apps, which fall outside the scope of the Trusted Shops objectives defined in issue #17945. Remove or separate these formatting changes into a different pull request to keep this one focused solely on the Trusted Shops integration.
Description Check ⚠️ Warning The pull request description only contains a resolves statement and does not follow the repository's template, as it lacks the required "## WHY" section explaining the rationale behind these changes. Please update the description to include the "## WHY" section per the template, detailing the motivation and goals of the Trusted Shops integration.
Title Check ❓ Inconclusive Title "17945 trusted shops" is vague and does not succinctly describe the core functionality added, as it merely references the issue number and project name without summarizing the integrated ETrusted actions. Consider renaming the pull request to clearly state the main change, for example "Add ETrusted Trusted Shops integration actions for reviews".
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues Check ✅ Passed The pull request implements all actions specified in issue #17945 for the Trusted Shops integration, including list retrieval, service review rating, light reviews, single review fetch, veto creation and retrieval, count retrieval, and review reply creation and deletion.
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 17945-trusted-shops

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
🧪 Early access (Sonnet 4.5): enabled

We are currently testing the Sonnet 4.5 model, which is expected to improve code review quality. However, this model may lead to increased noise levels in the review comments. Please disable the early access features if the noise level causes any inconvenience.

Note:

  • Public repositories are always opted into early access features.
  • You can enable or disable early access features from the CodeRabbit UI or by updating the CodeRabbit configuration file.

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

🧹 Nitpick comments (15)
components/common/constants.mjs (1)

1-1: Confirm API page-size max; consider a clearer name.

Please verify that 500 complies with eTrusted’s max allowed page size, otherwise requests may be rejected or truncated. Consider renaming to DEFAULT_PAGE_LIMIT to avoid ambiguity across apps.

components/etrusted/common/utils.mjs (2)

2-3: Don’t treat 0 / false as “unset”.

if (!obj) coerces 0 and false to undefined. Tighten the check to only skip undefined | null | "".

Apply:

-  if (!obj) return undefined;
+  if (obj === undefined || obj === null || obj === "") return undefined;

4-15: Optional: sanitize array items.

If any array contains empty strings, you’ll emit param= with empty tokens after .join(","). Either filter here or at call sites.

Would you like me to add an opt-in flag to parseObject to filter(Boolean) arrays?

components/etrusted/actions/get-review-veto-by-review-id/get-review-veto-by-review-id.mjs (1)

24-25: Summary wording: tie to input ID for reliability.

Use the provided reviewId in the summary (response shape may vary).

-    $.export("$summary", `Successfully retrieved veto with ID ${response.id}`);
+    $.export("$summary", `Successfully retrieved veto for review ${this.reviewId}`);
components/etrusted/actions/delete-review-reply/delete-review-reply.mjs (1)

6-6: Fix description to match action behavior.

Current text says “Reply to a review.” but this deletes a reply.

-  description: "Reply to a review. [See the documentation](https://developers.etrusted.com/reference/deletereviewreply)",
+  description: "Deletes a reply to a review. [See the documentation](https://developers.etrusted.com/reference/deletereviewreply)",
components/etrusted/actions/get-list-of-reviews/get-list-of-reviews.mjs (3)

83-83: Grammar nit in user-facing description.

Minor copy fix.

-      description: "A list of additional pieces of information to be retrieved with the review. If this property is not set, none of the of additional information are included in the review.",
+      description: "A list of additional pieces of information to retrieve with the review. If unset, none of the additional information is included.",

131-145: Filter empty tokens before joining multi-value params.

Prevents sending channels=, or similar when users pass blanks.

-        channels: this.channelId && parseObject(this.channelId).join(","),
+        channels: this.channelId && parseObject(this.channelId).filter(Boolean).join(","),
@@
-        rating: this.rating && parseObject(this.rating).join(","),
+        rating: this.rating && parseObject(this.rating).filter(Boolean).join(","),
-        status: this.status && parseObject(this.status).join(","),
+        status: this.status && parseObject(this.status).filter(Boolean).join(","),
-        type: this.type && parseObject(this.type).join(","),
+        type: this.type && parseObject(this.type).filter(Boolean).join(","),
@@
-        additionalInformation: this.additionalInformation && parseObject(this.additionalInformation).join(","),
+        additionalInformation: this.additionalInformation && parseObject(this.additionalInformation).filter(Boolean).join(","),
@@
-        sku: this.sku && parseObject(this.sku).join(","),
+        sku: this.sku && parseObject(this.sku).filter(Boolean).join(","),

127-147: Remove the unnecessary await — make paginate usage consistent

paginate is declared as async *paginate in components/etrusted/etrusted.app.mjs (returns an async iterable).

  • components/etrusted/actions/get-list-of-reviews/get-list-of-reviews.mjs — uses paginate without await (correct).
  • components/etrusted/actions/get-list-of-reviews-with-fewer-properties/get-list-of-reviews-with-fewer-properties.mjs — currently uses await this.etrusted.paginate(...) (around line 117); remove the await and iterate the async iterable (e.g., for await (...)) to match the other action.
components/etrusted/package.json (1)

3-17: Confirm compatibility and add license

  • @pipedream/platform@3.1.0 is the latest; no engines field is declared—verify it meets your runtime requirements.
  • Add a license field (e.g. "MIT") to package.json for clarity.
components/etrusted/actions/create-veto-for-review/create-veto-for-review.mjs (1)

33-38: Expose optional channelName to match API payload.

Docs show channelName in the request body; add it as an optional prop and pass it through. (developers.etrusted.com)

     vetoReporterEmail: {
       type: "string",
       label: "Veto Reporter Email",
       description: "The E-Mail address of the veto reporter.",
       optional: true,
     },
+    channelName: {
+      type: "string",
+      label: "Channel Name",
+      description: "Optional channel name to include with the veto.",
+      optional: true,
+    },
   },
   async run({ $ }) {
     const response = await this.etrusted.createVetoForReview({
       $,
       reviewId: this.reviewId,
       data: {
         comment: this.comment,
         reason: this.reason,
         vetoReporterEmail: this.vetoReporterEmail,
+        channelName: this.channelName,
       },
     });

Also applies to: 45-48

components/etrusted/actions/get-list-of-reviews-with-fewer-properties/get-list-of-reviews-with-fewer-properties.mjs (2)

132-135: Don’t send client-side maxResults as an API query param.

maxResults is handled by paginate; remove it from params to avoid sending unknown query params.

         orderBy: this.orderBy,
-        maxResults: this.maxResults,
       },
       maxResults: this.maxResults,

132-132: Normalize sku input (array or CSV) consistently.

Align with other actions by supporting arrays via parseObject and joining to CSV.

-        sku: this.sku,
+        sku: this.sku && (Array.isArray(parseObject(this.sku)) ? parseObject(this.sku).join(",") : this.sku),
components/etrusted/etrusted.app.mjs (3)

220-223: Let callers override page size when needed.

Default to LIMIT only if count isn’t already set. (developers.etrusted.com)

-        params.count = LIMIT;
+        params.count = params.count || LIMIT;

100-104: Make SKU a multi-select to reflect “list of SKUs”.

Prop says “list of product’s SKUs” but type is string. Prefer string[] to avoid per-action inconsistencies.

-    sku: {
-      type: "string",
+    sku: {
+      type: "string[]",
       label: "SKU",
-      description: "list of product's SKUs. Be aware, that this parameter does only make sense for product reviews.",
+      description: "One or more product SKUs. This parameter only applies to product reviews.",
     },

39-44: Fallback label for review options.

Some reviews may lack a title; use id as a fallback to avoid empty option labels.

-          options: items.map(({
-            id: value, title: label,
-          }) => ({
-            label,
-            value,
-          })),
+          options: items.map(({ id, title }) => ({
+            label: title || id,
+            value: id,
+          })),
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a6b99c9 and 45e508e.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (13)
  • components/common/constants.mjs (1 hunks)
  • components/etrusted/actions/create-veto-for-review/create-veto-for-review.mjs (1 hunks)
  • components/etrusted/actions/delete-review-reply/delete-review-reply.mjs (1 hunks)
  • components/etrusted/actions/get-list-of-reviews-with-fewer-properties/get-list-of-reviews-with-fewer-properties.mjs (1 hunks)
  • components/etrusted/actions/get-list-of-reviews/get-list-of-reviews.mjs (1 hunks)
  • components/etrusted/actions/get-review-by-id/get-review-by-id.mjs (1 hunks)
  • components/etrusted/actions/get-review-veto-by-review-id/get-review-veto-by-review-id.mjs (1 hunks)
  • components/etrusted/actions/get-service-review-rating/get-service-review-rating.mjs (1 hunks)
  • components/etrusted/actions/get-total-reviews/get-total-reviews.mjs (1 hunks)
  • components/etrusted/actions/save-review-reply/save-review-reply.mjs (1 hunks)
  • components/etrusted/common/utils.mjs (1 hunks)
  • components/etrusted/etrusted.app.mjs (1 hunks)
  • components/etrusted/package.json (2 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2024-12-12T19:23:09.039Z
Learnt from: jcortes
PR: PipedreamHQ/pipedream#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/etrusted/package.json
🧬 Code graph analysis (11)
components/etrusted/actions/get-list-of-reviews-with-fewer-properties/get-list-of-reviews-with-fewer-properties.mjs (2)
components/etrusted/actions/get-list-of-reviews/get-list-of-reviews.mjs (2)
  • response (127-147)
  • reviews (149-149)
components/etrusted/common/utils.mjs (2)
  • parseObject (1-24)
  • parseObject (1-24)
components/etrusted/common/utils.mjs (1)
components/akeneo/akeneo.app.mjs (1)
  • JSON (99-110)
components/etrusted/actions/get-review-veto-by-review-id/get-review-veto-by-review-id.mjs (2)
components/etrusted/actions/create-veto-for-review/create-veto-for-review.mjs (1)
  • response (41-49)
components/etrusted/actions/get-review-by-id/get-review-by-id.mjs (1)
  • response (19-22)
components/etrusted/actions/get-review-by-id/get-review-by-id.mjs (4)
components/etrusted/actions/create-veto-for-review/create-veto-for-review.mjs (1)
  • response (41-49)
components/etrusted/actions/delete-review-reply/delete-review-reply.mjs (1)
  • response (19-22)
components/etrusted/actions/get-review-veto-by-review-id/get-review-veto-by-review-id.mjs (1)
  • response (19-22)
components/etrusted/actions/save-review-reply/save-review-reply.mjs (1)
  • response (36-43)
components/etrusted/actions/get-total-reviews/get-total-reviews.mjs (2)
components/etrusted/actions/get-list-of-reviews/get-list-of-reviews.mjs (1)
  • response (127-147)
components/etrusted/common/utils.mjs (2)
  • parseObject (1-24)
  • parseObject (1-24)
components/etrusted/actions/get-list-of-reviews/get-list-of-reviews.mjs (2)
components/etrusted/actions/get-list-of-reviews-with-fewer-properties/get-list-of-reviews-with-fewer-properties.mjs (2)
  • response (117-137)
  • reviews (139-139)
components/etrusted/common/utils.mjs (2)
  • parseObject (1-24)
  • parseObject (1-24)
components/etrusted/actions/create-veto-for-review/create-veto-for-review.mjs (3)
components/etrusted/actions/delete-review-reply/delete-review-reply.mjs (1)
  • response (19-22)
components/etrusted/actions/get-review-veto-by-review-id/get-review-veto-by-review-id.mjs (1)
  • response (19-22)
components/etrusted/actions/save-review-reply/save-review-reply.mjs (1)
  • response (36-43)
components/etrusted/actions/get-service-review-rating/get-service-review-rating.mjs (3)
components/etrusted/actions/delete-review-reply/delete-review-reply.mjs (1)
  • response (19-22)
components/etrusted/actions/get-review-by-id/get-review-by-id.mjs (1)
  • response (19-22)
components/etrusted/actions/get-total-reviews/get-total-reviews.mjs (1)
  • response (85-99)
components/etrusted/etrusted.app.mjs (1)
components/common/constants.mjs (2)
  • LIMIT (1-1)
  • LIMIT (1-1)
components/etrusted/actions/save-review-reply/save-review-reply.mjs (3)
components/etrusted/actions/create-veto-for-review/create-veto-for-review.mjs (1)
  • response (41-49)
components/etrusted/actions/delete-review-reply/delete-review-reply.mjs (1)
  • response (19-22)
components/etrusted/actions/get-review-by-id/get-review-by-id.mjs (1)
  • response (19-22)
components/etrusted/actions/delete-review-reply/delete-review-reply.mjs (4)
components/etrusted/actions/create-veto-for-review/create-veto-for-review.mjs (1)
  • response (41-49)
components/etrusted/actions/get-review-by-id/get-review-by-id.mjs (1)
  • response (19-22)
components/etrusted/actions/get-review-veto-by-review-id/get-review-veto-by-review-id.mjs (1)
  • response (19-22)
components/etrusted/actions/save-review-reply/save-review-reply.mjs (1)
  • response (36-43)
🔇 Additional comments (13)
components/etrusted/actions/get-review-veto-by-review-id/get-review-veto-by-review-id.mjs (1)

18-22: LGTM.

Action wiring to getReviewVetoByReviewId looks correct.

components/etrusted/actions/get-review-by-id/get-review-by-id.mjs (1)

18-26: LGTM.

Straightforward call-through with clear summary.

components/etrusted/actions/delete-review-reply/delete-review-reply.mjs (1)

18-25: LGTM.

Correctly calls deleteReviewReply and exports a useful summary.

components/etrusted/actions/get-list-of-reviews/get-list-of-reviews.mjs (2)

12-19: PropDefinition vs. explicit type: confirm alignment.

You declare channelId as type: "string[]" while inheriting propDefinition: [etrusted, "channelId"]. Ensure the base definition supports multi-select to avoid UI/type mismatches.


154-157: LGTM on summary with pluralization.

Good UX touch.

components/etrusted/actions/get-service-review-rating/get-service-review-rating.mjs (1)

18-25: LGTM.

Clear mapping to getServiceReviewRating and concise summary.

components/etrusted/actions/create-veto-for-review/create-veto-for-review.mjs (1)

40-49: Endpoint usage LGTM.

POST to /reviews/{reviewId}/vetos with the provided payload matches the official docs. (developers.etrusted.com)

components/etrusted/actions/save-review-reply/save-review-reply.mjs (2)

12-22: Good constraint on selectable reviews.

Limiting reviewId options to APPROVED and MODERATION statuses aligns with the API’s reply semantics.


35-43: Request construction looks solid.

Body matches the API’s expected fields; optional sendNotification is handled. (developers.etrusted.com)

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

151-156: Correct endpoint for minimal reviews.

/reviews-minimal is the documented path for the “fewer properties” list. (developers.etrusted.com)


165-171: Correct endpoint for service review rating.

/channels/{channelId}/service-reviews/aggregate-rating matches docs. (developers.etrusted.com)


173-181: Correct endpoint for creating vetos.

POST /reviews/{reviewId}/vetos is per docs (note the spelling “vetos”). (developers.etrusted.com)


182-189: Correct endpoint for retrieving review veto by review ID.

GET /reviews/{reviewId}/vetos is per docs. (developers.etrusted.com)

- Updated import path for constants to reflect new file location.
- Added a new constants file defining the LIMIT value for configuration.
lcaresia
lcaresia previously approved these changes Sep 23, 2025
- Updated parameter assignments in get-list-of-reviews and get-total-reviews actions to use optional chaining for improved safety and readability.
- Simplified the logic for parsing channel, rating, status, type, additional information, and SKU parameters.
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 a33a020 and d622095.

📒 Files selected for processing (2)
  • components/etrusted/actions/get-list-of-reviews/get-list-of-reviews.mjs (1 hunks)
  • components/etrusted/actions/get-total-reviews/get-total-reviews.mjs (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
components/etrusted/actions/get-list-of-reviews/get-list-of-reviews.mjs (3)
components/etrusted/actions/get-total-reviews/get-total-reviews.mjs (1)
  • response (85-99)
components/etrusted/actions/get-list-of-reviews-with-fewer-properties/get-list-of-reviews-with-fewer-properties.mjs (2)
  • response (117-137)
  • reviews (139-139)
components/etrusted/common/utils.mjs (2)
  • parseObject (1-24)
  • parseObject (1-24)
components/etrusted/actions/get-total-reviews/get-total-reviews.mjs (1)
components/etrusted/common/utils.mjs (2)
  • parseObject (1-24)
  • parseObject (1-24)
⏰ 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). (1)
  • GitHub Check: pnpm publish
🔇 Additional comments (1)
components/etrusted/actions/get-total-reviews/get-total-reviews.mjs (1)

88-98: Guard against calling join() on non-arrays in query params.

parseObject(...) can legitimately return a plain string (e.g. when the user enters a single SKU/channel in the UI). In that case, parseObject(...)? .join(",") still attempts to invoke join on a string and throws at runtime, breaking the action. Please normalize the parsed value before joining so we only call join on arrays and pass strings through untouched.

   async run({ $ }) {
+    const toCsv = (value) => {
+      const parsed = parseObject(value);
+      if (parsed == null) return undefined;
+      return Array.isArray(parsed)
+        ? parsed.join(",")
+        : parsed;
+    };
+
     const response = await this.etrusted.getTotalReviews({
       $,
       params: {
-        channels: parseObject(this.channelId)?.join(","),
+        channels: toCsv(this.channelId),
         submittedAfter: this.submittedAfter,
         submittedBefore: this.submittedBefore,
-        rating: parseObject(this.rating)?.join(","),
-        status: parseObject(this.status)?.join(","),
-        type: parseObject(this.type)?.join(","),
+        rating: toCsv(this.rating),
+        status: toCsv(this.status),
+        type: toCsv(this.type),
         hasReply: this.hasReply,
         ignoreStatements: this.ignoreStatements,
         query: this.query,
-        sku: parseObject(this.sku)?.join(","),
+        sku: toCsv(this.sku),
       },
     });

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

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 25dbc6b and cd92ad5.

📒 Files selected for processing (2)
  • components/etrusted/actions/create-veto-for-review/create-veto-for-review.mjs (1 hunks)
  • components/etrusted/actions/get-review-veto-by-review-id/get-review-veto-by-review-id.mjs (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
components/etrusted/actions/get-review-veto-by-review-id/get-review-veto-by-review-id.mjs (3)
components/etrusted/actions/create-veto-for-review/create-veto-for-review.mjs (1)
  • response (40-48)
components/etrusted/actions/delete-review-reply/delete-review-reply.mjs (1)
  • response (19-22)
components/etrusted/actions/get-review-by-id/get-review-by-id.mjs (1)
  • response (19-22)
components/etrusted/actions/create-veto-for-review/create-veto-for-review.mjs (2)
components/etrusted/actions/get-review-veto-by-review-id/get-review-veto-by-review-id.mjs (1)
  • response (20-23)
components/etrusted/actions/save-review-reply/save-review-reply.mjs (1)
  • response (36-43)
⏰ 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: pnpm publish
  • GitHub Check: Lint Code Base
🔇 Additional comments (3)
components/etrusted/actions/create-veto-for-review/create-veto-for-review.mjs (3)

1-1: LGTM!

The import statement follows the standard pattern for Pipedream action modules.


3-8: LGTM!

The action metadata is complete and follows Pipedream conventions with appropriate key, name, description with documentation link, version, and type.


39-52: No changes needed: response.id is guaranteed by the API response.

@luancazarine
Copy link
Collaborator Author

/approve

@luancazarine luancazarine merged commit a844abe into master Oct 1, 2025
10 checks passed
@luancazarine luancazarine deleted the 17945-trusted-shops branch October 1, 2025 13:11
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.

Trusted Shops
2 participants