Skip to content

Conversation

@sergio-eliot-rodriguez
Copy link
Collaborator

@sergio-eliot-rodriguez sergio-eliot-rodriguez commented Dec 13, 2025

Resolves #19403

Creates actions:
get-ticket-details
list-ticket-threads
list-ticket-attachments
get-thread-details

Summary by CodeRabbit

  • New Features
    • Retrieve ticket details from Zoho Desk
    • Retrieve thread details within a specific ticket
    • List all attachments for a ticket
    • List all threads for a ticket
    • Improved thread and attachment selection with paginated options and continued loading context

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

@vercel
Copy link

vercel bot commented Dec 13, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Review Updated (UTC)
pipedream-docs-redirect-do-not-edit Ignored Ignored Dec 13, 2025 5:25am

@pipedream-component-development
Copy link
Collaborator

Thank you so much for submitting this! We've added it to our backlog to review, and our team has been notified.

@pipedream-component-development
Copy link
Collaborator

Thanks for submitting this PR! When we review PRs, we follow the Pipedream component guidelines. If you're not familiar, here's a quick checklist:

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 13, 2025

Walkthrough

Adds four Zoho Desk actions (get ticket/thread details, list ticket threads, list ticket attachments), exposes new app methods for ticket/thread retrieval, and bumps the Zoho Desk component package version.

Changes

Cohort / File(s) Change Summary
New action modules
components/zoho_desk/actions/get-thread-details/get-thread-details.mjs, components/zoho_desk/actions/get-ticket-details/get-ticket-details.mjs, components/zoho_desk/actions/list-ticket-attachments/list-ticket-attachments.mjs, components/zoho_desk/actions/list-ticket-threads/list-ticket-threads.mjs
Four new action modules added. Each exports action metadata, props wired to the Zoho Desk integration (orgId, ticketId, threadId, pagination where applicable), implements a run method that calls the corresponding zohoDesk API method, emits a summary, and returns response data.
App enhancements
components/zoho_desk/zoho_desk.app.mjs
Added a threadId propDefinition with paginated options and added public API methods getTicketDetails(...) and getThreadDetails({ ticketId, threadId, ... }).
Package version
components/zoho_desk/package.json
Incremented package version from 0.3.3 to 0.3.4.
Version-only bumps (many files)
components/zoho_desk/actions/*, components/zoho_desk/sources/*
Multiple action/source modules had only version increments (minor metadata updates) with no behavioral changes.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Pay attention to the new actions' propDefinition wiring and context propagation (orgId, ticketId, threadId).
  • Verify the new app methods' request paths/headers and that they match the action calls.
  • Confirm pagination/context update logic in threadId options function.
  • Quick pass on many version-only bumps to ensure no accidental functional edits.

Suggested labels

User submitted

Suggested reviewers

  • GTFalcao
  • michelle0927

Pre-merge checks and finishing touches

❌ Failed checks (3 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Zoho desk comps' is vague and generic, using non-descriptive abbreviation 'comps' without clarifying the specific changes or actions being added to the Zoho Desk integration. Use a more descriptive title that specifies the new actions being added, such as 'Add Zoho Desk ticket and thread detail actions' or 'Implement Zoho Desk get-ticket-details, list-ticket-threads, list-ticket-attachments, and get-thread-details actions'.
Description check ❓ Inconclusive The pull request description is incomplete. While it lists the four new actions and references issue #19403, it does not follow the required template structure which includes a 'WHY' section explaining the motivation or context for these changes. Fill in the 'WHY' section of the description template to explain the motivation, use case, or business context for adding these four Zoho Desk actions.
Out of Scope Changes check ❓ Inconclusive The changeset includes version bumps across multiple existing actions and sources in the Zoho Desk component, along with adding new API methods to the main app module. While these version increments appear necessary and related to the new actions, they extend beyond the strict scope of the four new action files. Clarify whether the version bumps across existing actions and sources are required for compatibility with the new actions, or if they should be separated into a distinct maintenance release.
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The pull request implements four of the requested Zoho Desk API operations from issue #19403: get-ticket-details, list-ticket-threads, list-ticket-attachments, and get-thread-details, aligning with the Tickets, Threads, and Attachments API requirements. However, not all requested operations from issue #19403 are fully implemented.
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

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: 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 43d05d0 and cc100bd.

📒 Files selected for processing (6)
  • components/zoho_desk/actions/get-thread-details/get-thread-details.mjs (1 hunks)
  • components/zoho_desk/actions/get-ticket-details/get-ticket-details.mjs (1 hunks)
  • components/zoho_desk/actions/list-ticket-attachments/list-ticket-attachments.mjs (1 hunks)
  • components/zoho_desk/actions/list-ticket-threads/list-ticket-threads.mjs (1 hunks)
  • components/zoho_desk/package.json (1 hunks)
  • components/zoho_desk/zoho_desk.app.mjs (3 hunks)
🧰 Additional context used
🧬 Code graph analysis (4)
components/zoho_desk/actions/get-ticket-details/get-ticket-details.mjs (1)
components/zoho_desk/actions/list-ticket-attachments/list-ticket-attachments.mjs (1)
  • response (38-44)
components/zoho_desk/actions/get-thread-details/get-thread-details.mjs (1)
components/zoho_desk/actions/list-ticket-threads/list-ticket-threads.mjs (1)
  • response (56-63)
components/zoho_desk/actions/list-ticket-threads/list-ticket-threads.mjs (1)
components/zoho_desk/zoho_desk.app.mjs (3)
  • from (606-606)
  • from (869-869)
  • threads (114-124)
components/zoho_desk/zoho_desk.app.mjs (2)
components/zoho_desk/actions/list-ticket-threads/list-ticket-threads.mjs (1)
  • threads (65-65)
components/zoho_desk/actions/list-ticket-attachments/list-ticket-attachments.mjs (1)
  • attachments (46-46)
⏰ 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 (8)
components/zoho_desk/package.json (1)

3-3: LGTM!

The version bump appropriately reflects the addition of new Zoho Desk actions in this PR.

components/zoho_desk/actions/get-ticket-details/get-ticket-details.mjs (1)

1-51: LGTM!

The action is well-structured and follows Pipedream conventions. The prop wiring correctly propagates orgId to the ticketId prop definition, and the run method properly extracts parameters and calls the underlying API method.

components/zoho_desk/actions/list-ticket-attachments/list-ticket-attachments.mjs (1)

1-52: LGTM!

The action follows the established pattern and correctly returns an array of attachments with an informative summary message.

components/zoho_desk/zoho_desk.app.mjs (3)

100-141: LGTM!

The threadId propDefinition is well-implemented with proper validation, pagination support, and option mapping. The early return when ticketId is not provided prevents unnecessary API calls.


781-788: LGTM!

The getTicketDetails method follows the established pattern and correctly constructs the API endpoint path.


797-804: LGTM!

The getThreadDetails method is correctly implemented and follows the consistent pattern used throughout the app module.

components/zoho_desk/actions/list-ticket-threads/list-ticket-threads.mjs (1)

1-70: LGTM!

The action is well-implemented with optional pagination support. The conditional param building (lines 52-54) ensures clean API calls without undefined values.

components/zoho_desk/actions/get-thread-details/get-thread-details.mjs (1)

1-64: LGTM!

The action correctly chains prop dependencies (orgId → ticketId → threadId) to ensure thread options are loaded with the appropriate context. The implementation is consistent with the other actions in this PR.

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
components/zoho_desk/sources/changed-ticket-status/changed-ticket-status.mjs (1)

26-54: Consider adding JSDoc documentation to methods.

Per the Pipedream component development guidelines, methods should be documented with JSDoc comments. This would improve maintainability and provide clearer intent for each method.

Example JSDoc format:

   methods: {
     ...common.methods,
+    /**
+     * Get the resource fetch function for polling tickets.
+     * @returns {Function} The searchTickets method
+     */
     getResourceFn() {
       return this.zohoDesk.searchTickets;
     },
+    /**
+     * Build arguments for the resource fetch function.
+     * @returns {Object} Headers and params for the search query
+     */
     getResourceFnArgs() {
       return {
         headers: {
           orgId: this.orgId,
         },
         params: {
           sortBy: "modifiedTime",
           status: this.status,
         },
       };
     },
📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cc100bd and bc70790.

📒 Files selected for processing (30)
  • components/zoho_desk/actions/add-ticket-attachment/add-ticket-attachment.mjs (1 hunks)
  • components/zoho_desk/actions/add-ticket-comment/add-ticket-comment.mjs (1 hunks)
  • components/zoho_desk/actions/create-account/create-account.mjs (1 hunks)
  • components/zoho_desk/actions/create-contact/create-contact.mjs (1 hunks)
  • components/zoho_desk/actions/create-ticket/create-ticket.mjs (1 hunks)
  • components/zoho_desk/actions/find-contact/find-contact.mjs (1 hunks)
  • components/zoho_desk/actions/find-or-create-contact/find-or-create-contact.mjs (1 hunks)
  • components/zoho_desk/actions/get-article/get-article.mjs (1 hunks)
  • components/zoho_desk/actions/list-articles/list-articles.mjs (1 hunks)
  • components/zoho_desk/actions/list-help-centers/list-help-centers.mjs (1 hunks)
  • components/zoho_desk/actions/list-root-categories/list-root-categories.mjs (1 hunks)
  • components/zoho_desk/actions/list-tickets/list-tickets.mjs (1 hunks)
  • components/zoho_desk/actions/search-articles/search-articles.mjs (1 hunks)
  • components/zoho_desk/actions/search-ticket/search-ticket.mjs (1 hunks)
  • components/zoho_desk/actions/send-email-reply/send-email-reply.mjs (1 hunks)
  • components/zoho_desk/actions/update-contact/update-contact.mjs (1 hunks)
  • components/zoho_desk/actions/update-ticket/update-ticket.mjs (1 hunks)
  • components/zoho_desk/sources/changed-ticket-status/changed-ticket-status.mjs (1 hunks)
  • components/zoho_desk/sources/deleted-article-instant/deleted-article-instant.mjs (1 hunks)
  • components/zoho_desk/sources/new-account/new-account.mjs (1 hunks)
  • components/zoho_desk/sources/new-agent/new-agent.mjs (1 hunks)
  • components/zoho_desk/sources/new-article-instant/new-article-instant.mjs (1 hunks)
  • components/zoho_desk/sources/new-contact/new-contact.mjs (1 hunks)
  • components/zoho_desk/sources/new-ticket-attachment/new-ticket-attachment.mjs (1 hunks)
  • components/zoho_desk/sources/new-ticket-comment/new-ticket-comment.mjs (1 hunks)
  • components/zoho_desk/sources/new-ticket-message/new-ticket-message.mjs (1 hunks)
  • components/zoho_desk/sources/new-ticket/new-ticket.mjs (1 hunks)
  • components/zoho_desk/sources/updated-article-instant/updated-article-instant.mjs (1 hunks)
  • components/zoho_desk/sources/updated-ticket/updated-ticket.mjs (1 hunks)
  • components/zoho_desk/zoho_desk.app.mjs (3 hunks)
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2024-10-30T15:24:39.294Z
Learnt from: jcortes
Repo: PipedreamHQ/pipedream PR: 14467
File: components/gainsight_px/actions/create-account/create-account.mjs:4-6
Timestamp: 2024-10-30T15:24:39.294Z
Learning: In `components/gainsight_px/actions/create-account/create-account.mjs`, the action name should be "Create Account" instead of "Create Memory".

Applied to files:

  • components/zoho_desk/actions/find-or-create-contact/find-or-create-contact.mjs
  • components/zoho_desk/actions/create-contact/create-contact.mjs
  • components/zoho_desk/actions/create-account/create-account.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/zoho_desk/sources/updated-article-instant/updated-article-instant.mjs
📚 Learning: 2025-01-23T03:55:15.166Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 15376
File: components/monday/sources/name-updated/name-updated.mjs:6-6
Timestamp: 2025-01-23T03:55:15.166Z
Learning: Source names in Monday.com components don't need to start with "New" if they emit events for updated items (e.g., "Name Updated", "Column Value Updated") rather than new items. This follows the component guidelines exception where the "New" prefix is only required when emits are limited to new items.

Applied to files:

  • components/zoho_desk/sources/updated-ticket/updated-ticket.mjs
🧬 Code graph analysis (1)
components/zoho_desk/zoho_desk.app.mjs (1)
components/zoho_desk/actions/list-ticket-threads/list-ticket-threads.mjs (1)
  • threads (65-65)
⏰ 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: Verify TypeScript components
  • GitHub Check: Lint Code Base
🔇 Additional comments (31)
components/zoho_desk/actions/list-help-centers/list-help-centers.mjs (1)

8-8: Version bump is appropriate.

The metadata-only version change from 0.0.3 to 0.0.4 aligns with the release cycle for this Zoho Desk component update. No runtime behavior changes. Action structure follows Pipedream conventions: proper naming convention, app instance pattern, documentation link, appropriate annotation hints, and user-friendly summary generation.

components/zoho_desk/sources/changed-ticket-status/changed-ticket-status.mjs (1)

9-9: Version bump is appropriate.

The version increment from 0.0.8 to 0.0.9 aligns with the package-level version bump to 0.3.4 and the addition of new Zoho Desk actions in this PR.

components/zoho_desk/sources/new-article-instant/new-article-instant.mjs (1)

10-10: LGTM!

Version bump aligns with the package version update.

components/zoho_desk/sources/updated-article-instant/updated-article-instant.mjs (1)

10-10: LGTM!

Version bump aligns with the package version update.

components/zoho_desk/sources/deleted-article-instant/deleted-article-instant.mjs (1)

10-10: Version bump is consistent with coordinated package release.

The version bump to 0.0.5 aligns with the PR's overall strategy of version bumps across Zoho Desk sources and the package version update to 0.3.4 mentioned in the summary. This is standard practice for coordinated releases.

Please confirm that this version bump is justified by the package-level changes (new actions, API methods, etc.) and that all affected Zoho Desk sources have been updated consistently.

components/zoho_desk/sources/new-ticket-message/new-ticket-message.mjs (1)

44-44: No action needed. The getTicketThreads method is properly defined in components/zoho_desk/zoho_desk.app.mjs at line 727, confirming the method reference on line 44 of new-ticket-message.mjs is valid.

components/zoho_desk/actions/get-article/get-article.mjs (1)

8-8: Version bump is appropriate; verify alignment with PR scope.

The version change from 0.0.4 aligns with the package version bump (0.3.3 → 0.3.4) mentioned in the PR context. However, I can only review this single file, whereas the PR objectives indicate four new actions and app.mjs modifications were added.

Please confirm that:

  1. All four new action files (get-ticket-details, list-ticket-threads, list-ticket-attachments, get-thread-details) follow the same patterns as this file and adhere to the Pipedream component guidelines (JSDoc documentation, optional props with defaults, async options for user input, pagination handling where applicable).
  2. The new methods (getTicketDetails, getThreadDetails) in zoho_desk.app.mjs are properly documented with JSDoc and expose the correct API operations referenced in issue #19403.
  3. All existing actions updated with version bumps (mentioned in the AI summary) have consistent versioning strategy.
components/zoho_desk/sources/new-ticket-attachment/new-ticket-attachment.mjs (1)

11-11: Version bump is consistent with package uplift.

The version increment from 0.1.3 to 0.1.4 aligns with the broader Zoho Desk package version uplift (0.3.3 → 0.3.4) mentioned in the PR context. This is appropriate.

components/zoho_desk/actions/create-account/create-account.mjs (1)

8-8: Version bump to "0.0.8" is appropriate and consistent. The version aligns with other Zoho Desk actions that perform write/mutation operations (create-account, create-ticket, create-contact, update-contact, add-ticket-comment, search-ticket, send-email-reply, find-or-create-contact, find-contact, update-ticket), while read-only actions maintain lower versions (0.0.1–0.0.4).

components/zoho_desk/actions/search-ticket/search-ticket.mjs (1)

8-8: Version bump to 0.0.8 is part of a coordinated release across Zoho Desk ticket operations.

This version bump aligns with the repository's versioning conventions—multiple related Zoho Desk actions were incremented together in commit bc70790. No functional changes to this file.

components/zoho_desk/actions/search-articles/search-articles.mjs (1)

3-8: Version bump from 0.0.3 to 0.0.4 correctly follows Pipedream's semantic versioning guidelines.

No behavioral changes in this update—only the version field incremented on line 7. The PATCH-level bump (0.0.x) is the correct choice for backwards-compatible changes per Pipedream's official component versioning policy. Approved.

components/zoho_desk/sources/updated-ticket/updated-ticket.mjs (1)

9-9: LGTM: Routine version bump.

The version increment aligns with the package release that introduces new Zoho Desk actions.

components/zoho_desk/actions/add-ticket-comment/add-ticket-comment.mjs (1)

8-8: LGTM: Routine version bump.

The version increment aligns with the package release that introduces new Zoho Desk actions.

components/zoho_desk/sources/new-ticket/new-ticket.mjs (1)

9-9: LGTM: Routine version bump.

The version increment aligns with the package release that introduces new Zoho Desk actions.

components/zoho_desk/actions/add-ticket-attachment/add-ticket-attachment.mjs (1)

10-10: LGTM: Routine version bump.

The version increment aligns with the package release that introduces new Zoho Desk actions.

components/zoho_desk/actions/list-tickets/list-tickets.mjs (1)

8-8: LGTM: Routine version bump.

The version increment aligns with the package release that introduces new Zoho Desk actions.

components/zoho_desk/sources/new-agent/new-agent.mjs (1)

9-9: LGTM: Routine version bump.

The version increment aligns with the package release that introduces new Zoho Desk actions.

components/zoho_desk/sources/new-account/new-account.mjs (1)

9-9: LGTM: Routine version bump.

The version increment aligns with the package release that introduces new Zoho Desk actions.

components/zoho_desk/actions/find-contact/find-contact.mjs (1)

8-8: LGTM: Routine version bump.

The version increment aligns with the package release that introduces new Zoho Desk actions.

components/zoho_desk/actions/update-contact/update-contact.mjs (1)

6-9: Version bump only — OK.
No behavioral changes observed; this looks like a metadata release increment.

components/zoho_desk/actions/find-or-create-contact/find-or-create-contact.mjs (1)

6-9: Version bump only — OK.
No behavioral changes observed; this looks like a metadata release increment.

components/zoho_desk/actions/list-articles/list-articles.mjs (1)

5-8: Version bump only — OK.
No behavioral changes observed; this looks like a metadata release increment.

components/zoho_desk/actions/update-ticket/update-ticket.mjs (1)

6-9: Version bump only — OK.
No behavioral changes observed; this looks like a metadata release increment.

components/zoho_desk/actions/send-email-reply/send-email-reply.mjs (1)

6-9: Version bump only — OK.
No behavioral changes observed; this looks like a metadata release increment.

components/zoho_desk/actions/create-ticket/create-ticket.mjs (1)

6-9: Version bump only — OK.
No behavioral changes observed; this looks like a metadata release increment.

components/zoho_desk/actions/create-contact/create-contact.mjs (1)

6-9: Version bump only — OK.
No behavioral changes observed; this looks like a metadata release increment.

components/zoho_desk/sources/new-contact/new-contact.mjs (1)

7-10: Version bump only — OK.
No behavioral changes observed; this looks like a metadata release increment.

components/zoho_desk/actions/list-root-categories/list-root-categories.mjs (1)

7-7: Version bump only — looks consistent.
No functional changes; bumping the action version is fine.

components/zoho_desk/sources/new-ticket-comment/new-ticket-comment.mjs (1)

9-9: Version bump only — LGTM.
No logic changes in the polling source.

components/zoho_desk/zoho_desk.app.mjs (2)

719-726: getTicketDetails wrapper looks good.
Cleanly exposes GET /tickets/{ticketId} via makeRequest, consistent with existing app methods.


735-742: getThreadDetails wrapper looks good.
Matches the expected /tickets/{ticketId}/threads/{threadId} shape and keeps the public surface minimal.

Comment on lines +100 to +141
threadId: {
type: "string",
label: "Thread ID",
description: "The ID of the thread",
async options({
ticketId, orgId, prevContext,
}) {
if (!ticketId) {
return [];
}
const { from = 1 } = prevContext || {};
if (from === null) {
return [];
}
const { data: threads = [] } =
await this.getTicketThreads({
ticketId,
headers: {
orgId,
},
params: {
from,
limit: constants.DEFAULT_LIMIT,
},
});
const currentLen = threads?.length;
const options = threads?.map(({
id: value, summary: label,
}) => ({
value,
label: label || value,
}));
return {
options: options || [],
context: {
from: currentLen
? currentLen + from
: null,
},
};
},
},
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# First, let's find and examine the getTicketThreads method
rg -n "getTicketThreads" components/zoho_desk/zoho_desk.app.mjs -A 15

Repository: PipedreamHQ/pipedream

Length of output: 989


🏁 Script executed:

# Search for other options methods to see how they handle orgId
rg -n "async options" components/zoho_desk/zoho_desk.app.mjs -B 2 -A 20

Repository: PipedreamHQ/pipedream

Length of output: 8904


🏁 Script executed:

# Check if there are any comments about pagination in the file
rg -n "from|pagination|limit" components/zoho_desk/zoho_desk.app.mjs -B 2 -A 2

Repository: PipedreamHQ/pipedream

Length of output: 3175


🏁 Script executed:

# Get the overall structure of the file to understand context
wc -l components/zoho_desk/zoho_desk.app.mjs
head -50 components/zoho_desk/zoho_desk.app.mjs

Repository: PipedreamHQ/pipedream

Length of output: 1304


🏁 Script executed:

# Get the full getResourcesOptions method
sed -n '774,799p' components/zoho_desk/zoho_desk.app.mjs

Repository: PipedreamHQ/pipedream

Length of output: 726


🏁 Script executed:

# Check the makeRequest method to understand how it handles undefined headers
rg -n "makeRequest" components/zoho_desk/zoho_desk.app.mjs -A 5 | head -40

Repository: PipedreamHQ/pipedream

Length of output: 924


🏁 Script executed:

# Check how portalId and departmentId handle orgId vs how threadId uses it
sed -n '30,47p' components/zoho_desk/zoho_desk.app.mjs
sed -n '53,64p' components/zoho_desk/zoho_desk.app.mjs
sed -n '100,141p' components/zoho_desk/zoho_desk.app.mjs

Repository: PipedreamHQ/pipedream

Length of output: 1783


🏁 Script executed:

# Check if orgId is a required prop elsewhere or if it can be undefined
rg -n "orgId" components/zoho_desk/zoho_desk.app.mjs | head -20

Repository: PipedreamHQ/pipedream

Length of output: 327


🏁 Script executed:

# Check if there are any tests or error scenarios related to orgId
find . -name "*.test.*" -o -name "*.spec.*" | grep -i zoho_desk

Repository: PipedreamHQ/pipedream

Length of output: 47


🏁 Script executed:

# Check the listHelpCenters method to see if it validates orgId
rg -n "listHelpCenters|getDepartments|getContacts" components/zoho_desk/zoho_desk.app.mjs -A 8

Repository: PipedreamHQ/pipedream

Length of output: 1579


🏁 Script executed:

# Check if there's any documentation or comments about orgId requirement
rg -n "orgId" components/zoho_desk/ -B 2 -A 2 | head -60

Repository: PipedreamHQ/pipedream

Length of output: 3745


🏁 Script executed:

# Check the constants to understand DEFAULT_LIMIT
cat components/zoho_desk/common/constants.mjs

Repository: PipedreamHQ/pipedream

Length of output: 1135


Add orgId guard to threadId options.
Unlike portalId which checks if (!orgId) return [];, the threadId options method sends orgId in headers even when undefined, which can cause confusing auth errors during prop selection. The pagination logic (starting at from: 1 and incrementing by result count) is correct and consistent with other methods in the codebase.

 async options({
   ticketId, orgId, prevContext,
 }) {
-  if (!ticketId) {
+  if (!ticketId || !orgId) {
     return [];
   }
🤖 Prompt for AI Agents
In components/zoho_desk/zoho_desk.app.mjs around lines 100 to 141, the threadId
async options sends orgId in headers even when undefined; add a guard like other
props to return [] immediately if orgId is falsy (and keep the existing ticketId
check), so the method exits early and does not include an undefined orgId header
when calling getTicketThreads.

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

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

Test reports

@sergio-eliot-rodriguez sergio-eliot-rodriguez merged commit e8965ab into PipedreamHQ:master Dec 15, 2025
9 checks passed
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.

[ACTION] Zoho Desk

4 participants