Skip to content

17497-zendesk #17499

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jul 10, 2025
Merged

17497-zendesk #17499

merged 7 commits into from
Jul 10, 2025

Conversation

Afstkla
Copy link
Contributor

@Afstkla Afstkla commented Jul 7, 2025

WHY

Resolves #17497 (if I did it correctly)

Summary by CodeRabbit

  • New Features

    • Added options to specify if a ticket comment body is HTML and whether the comment is public when updating Zendesk tickets.
    • Made the "Trigger Category ID" optional for more flexible configuration.
  • Chores

    • Updated action and package versions for Zendesk integration.

Copy link

vercel bot commented Jul 7, 2025

@Afstkla is attempting to deploy a commit to the Pipedreamers Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

coderabbitai bot commented Jul 7, 2025

"""

Walkthrough

The changes introduce two new optional properties, ticketCommentBodyIsHTML and ticketCommentPublic, to the Zendesk integration, allowing selection between HTML and plain text for ticket comments and specifying comment visibility. The "Trigger Category ID" property is made optional. The package and action versions are incremented accordingly.

Changes

File(s) Change Summary
components/zendesk/actions/update-ticket/update-ticket.mjs Added ticketCommentBodyIsHTML and ticketCommentPublic props; updated comment payload handling; version bump
components/zendesk/zendesk.app.mjs Added ticketCommentBodyIsHTML and ticketCommentPublic prop definitions; made categoryId optional
components/zendesk/package.json Bumped package version from 0.7.0 to 0.7.1
components/zendesk/actions/create-ticket/create-ticket.mjs Version bump from 0.1.3 to 0.1.4
components/zendesk/actions/delete-ticket/delete-ticket.mjs Version bump from 0.1.3 to 0.1.4
components/zendesk/actions/get-ticket-info/get-ticket-info.mjs Version bump from 0.0.1 to 0.0.2
components/zendesk/actions/list-tickets/list-tickets.mjs Version bump from 0.0.1 to 0.0.2
components/zendesk/actions/search-tickets/search-tickets.mjs Version bump from 0.0.1 to 0.0.2
components/zendesk/sources/new-ticket/new-ticket.mjs Version bump from 0.2.3 to 0.2.4
components/zendesk/sources/ticket-added-to-view/ticket-added-to-view.mjs Version bump from 0.0.3 to 0.0.4
components/zendesk/sources/ticket-closed/ticket-closed.mjs Version bump from 0.2.3 to 0.2.4
components/zendesk/sources/ticket-pended/ticket-pended.mjs Version bump from 0.2.3 to 0.2.4
components/zendesk/sources/ticket-solved/ticket-solved.mjs Version bump from 0.2.3 to 0.2.4
components/zendesk/sources/ticket-updated/ticket-updated.mjs Version bump from 0.2.3 to 0.2.4

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant ZendeskAction
    participant ZendeskAPI

    User->>ZendeskAction: Provide ticket update input (body, isHTML, public)
    ZendeskAction->>ZendeskAction: Build comment payload (body/html_body, public)
    ZendeskAction->>ZendeskAPI: Send ticket update with constructed comment
    ZendeskAPI-->>ZendeskAction: Respond with update result
    ZendeskAction-->>User: Return update outcome
Loading

Assessment against linked issues

Objective Addressed Explanation
Make categoryId optional for triggers (#17497)
Add public optional field to allow internal/external notes in ticket comments (#17497)
Allow choice between body and html_body for ticket comment formatting (#17497)

Poem

A hop and a skip, a ticket anew,
Now comments can shimmer in HTML too!
Public or private, you choose with delight,
And categories? Optional—now setup feels right.
The Zendesk bunny, with ears held high,
Celebrates these changes—oh my, oh my! 🐇✨
"""

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

components/zendesk/actions/delete-ticket/delete-ticket.mjs

Oops! Something went wrong! :(

ESLint: 8.57.1

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs
at Object.getPackageJSONURL (node:internal/modules/package_json_reader:255:9)
at packageResolve (node:internal/modules/esm/resolve:767:81)
at moduleResolve (node:internal/modules/esm/resolve:853:18)
at defaultResolve (node:internal/modules/esm/resolve:983:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:801:12)
at #cachedDefaultResolve (node:internal/modules/esm/loader:725:25)
at ModuleLoader.resolve (node:internal/modules/esm/loader:708:38)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:309:38)
at #link (node:internal/modules/esm/module_job:202:49)

components/zendesk/actions/get-ticket-info/get-ticket-info.mjs

Oops! Something went wrong! :(

ESLint: 8.57.1

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs
at Object.getPackageJSONURL (node:internal/modules/package_json_reader:255:9)
at packageResolve (node:internal/modules/esm/resolve:767:81)
at moduleResolve (node:internal/modules/esm/resolve:853:18)
at defaultResolve (node:internal/modules/esm/resolve:983:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:801:12)
at #cachedDefaultResolve (node:internal/modules/esm/loader:725:25)
at ModuleLoader.resolve (node:internal/modules/esm/loader:708:38)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:309:38)
at #link (node:internal/modules/esm/module_job:202:49)

components/zendesk/actions/list-tickets/list-tickets.mjs

Oops! Something went wrong! :(

ESLint: 8.57.1

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs
at Object.getPackageJSONURL (node:internal/modules/package_json_reader:255:9)
at packageResolve (node:internal/modules/esm/resolve:767:81)
at moduleResolve (node:internal/modules/esm/resolve:853:18)
at defaultResolve (node:internal/modules/esm/resolve:983:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:801:12)
at #cachedDefaultResolve (node:internal/modules/esm/loader:725:25)
at ModuleLoader.resolve (node:internal/modules/esm/loader:708:38)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:309:38)
at #link (node:internal/modules/esm/module_job:202:49)

  • 10 others

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 35b47cb and d3ed934.

📒 Files selected for processing (14)
  • components/zendesk/actions/create-ticket/create-ticket.mjs (1 hunks)
  • components/zendesk/actions/delete-ticket/delete-ticket.mjs (1 hunks)
  • components/zendesk/actions/get-ticket-info/get-ticket-info.mjs (1 hunks)
  • components/zendesk/actions/list-tickets/list-tickets.mjs (1 hunks)
  • components/zendesk/actions/search-tickets/search-tickets.mjs (1 hunks)
  • components/zendesk/actions/update-ticket/update-ticket.mjs (4 hunks)
  • components/zendesk/package.json (1 hunks)
  • components/zendesk/sources/new-ticket/new-ticket.mjs (1 hunks)
  • components/zendesk/sources/ticket-added-to-view/ticket-added-to-view.mjs (1 hunks)
  • components/zendesk/sources/ticket-closed/ticket-closed.mjs (1 hunks)
  • components/zendesk/sources/ticket-pended/ticket-pended.mjs (1 hunks)
  • components/zendesk/sources/ticket-solved/ticket-solved.mjs (1 hunks)
  • components/zendesk/sources/ticket-updated/ticket-updated.mjs (1 hunks)
  • components/zendesk/zendesk.app.mjs (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (14)
  • components/zendesk/sources/ticket-pended/ticket-pended.mjs
  • components/zendesk/actions/delete-ticket/delete-ticket.mjs
  • components/zendesk/sources/ticket-added-to-view/ticket-added-to-view.mjs
  • components/zendesk/package.json
  • components/zendesk/sources/new-ticket/new-ticket.mjs
  • components/zendesk/sources/ticket-closed/ticket-closed.mjs
  • components/zendesk/actions/get-ticket-info/get-ticket-info.mjs
  • components/zendesk/actions/create-ticket/create-ticket.mjs
  • components/zendesk/actions/list-tickets/list-tickets.mjs
  • components/zendesk/sources/ticket-updated/ticket-updated.mjs
  • components/zendesk/sources/ticket-solved/ticket-solved.mjs
  • components/zendesk/actions/search-tickets/search-tickets.mjs
  • components/zendesk/zendesk.app.mjs
  • components/zendesk/actions/update-ticket/update-ticket.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: Lint Code Base
  • GitHub Check: pnpm publish
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Verify TypeScript components
✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

vercel bot commented Jul 7, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
pipedream-docs ⬜️ Ignored (Inspect) Jul 10, 2025 2:35pm
pipedream-docs-redirect-do-not-edit ⬜️ Ignored (Inspect) Jul 10, 2025 2:35pm

@adolfo-pd adolfo-pd added the User submitted Submitted by a user label Jul 7, 2025
@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:

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 827dd7b and 800b100.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (3)
  • components/zendesk/actions/update-ticket/update-ticket.mjs (4 hunks)
  • components/zendesk/package.json (2 hunks)
  • components/zendesk/zendesk.app.mjs (3 hunks)
🧰 Additional context used
🧠 Learnings (2)
components/zendesk/package.json (1)
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.
components/zendesk/zendesk.app.mjs (1)
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#14229
File: components/americommerce/actions/update-customer/update-customer.mjs:89-94
Timestamp: 2024-10-08T16:42:59.225Z
Learning: When defining boolean properties in AmeriCommerce components (e.g., in `update-customer.mjs`), ensure that the label and description are consistent and clearly indicate the intent, especially when using negations like "No Account", to avoid confusion.
🔇 Additional comments (8)
components/zendesk/package.json (1)

3-3: LGTM - Appropriate version bump.

The version increment from 0.7.0 to 0.7.1 is appropriate for the new optional properties added to the Zendesk integration.

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

12-12: LGTM - Making categoryId optional.

Making the Trigger Category ID optional provides better flexibility for users who may not need to specify a category.


128-134: LGTM - Well-defined HTML body property.

The ticketCommentBodyIsHTML property is properly defined with:

  • Clear label and description
  • Appropriate default value (false) for backward compatibility
  • Optional flag for flexibility

155-161: LGTM - Well-defined public visibility property.

The ticketCommentPublic property is properly defined with:

  • Clear label and description
  • Appropriate default value (true) matching typical comment behavior
  • Optional flag for flexibility
components/zendesk/actions/update-ticket/update-ticket.mjs (4)

8-8: LGTM - Appropriate version bump.

The version increment from 0.1.3 to 0.1.4 is appropriate for the new optional properties added to the update-ticket action.


23-28: LGTM - Proper prop definitions.

The new properties are correctly defined using propDefinitions from the app, maintaining consistency with the existing pattern.

Also applies to: 47-52


82-90: LGTM - Correct conditional logic for HTML vs plain text.

The implementation correctly uses either html_body or body based on the ticketCommentBodyIsHTML flag, providing flexibility for rich content formatting while maintaining backward compatibility.


90-90: LGTM - Proper public visibility handling.

The public attribute is correctly set on the comment object and used in the ticket update payload, providing control over comment visibility.

Also applies to: 98-98

@@ -17,4 +17,4 @@
"@pipedream/platform": "^3.0.3",
"crypto": "^1.0.1"
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

Remove built-in Node.js module from dependencies.

The crypto module is a built-in Node.js module and should not be included in package.json dependencies. This is similar to other built-in modules like fs that are provided by the Node.js runtime.

-    "crypto": "^1.0.1"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"crypto": "^1.0.1"
🤖 Prompt for AI Agents
In components/zendesk/package.json at line 18, remove the "crypto" dependency
entry because it is a built-in Node.js module and should not be listed in the
dependencies section of package.json.

@Afstkla
Copy link
Contributor Author

Afstkla commented Jul 8, 2025

Fixed the comments @andrewjschuang @adolfo-pd lmk if anything more is needed from my side. Difficult to test from my side but based on the docs & my experience with Zendesk, these changes seem sensible

Copy link
Collaborator

@jcortes jcortes left a comment

Choose a reason for hiding this comment

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

Hi @Afstkla lgtm! Ready for QA!

@jcortes jcortes moved this from In Review to Ready for QA in Component (Source and Action) Backlog Jul 8, 2025
@vunguyenhung vunguyenhung moved this from Ready for QA to Ready for Release in Component (Source and Action) Backlog Jul 9, 2025
@vunguyenhung
Copy link
Collaborator

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

Test report
https://vunguyenhung.notion.site/17497-zendesk-22abf548bb5e8105a5adef1abd937496

@Afstkla
Copy link
Contributor Author

Afstkla commented Jul 9, 2025

@vunguyenhung would you also be so kind as to test the public / private boolean that's new? Your test report only covers external replies if I see it correctly

@vunguyenhung
Copy link
Collaborator

@Afstkla thanks for notifying. The Comment Public = FALSE doesn't work. Moving it back to Changes Required

@vunguyenhung vunguyenhung moved this from Ready for Release to Changes Required in Component (Source and Action) Backlog Jul 9, 2025
@vunguyenhung
Copy link
Collaborator

Hello everyone, I have tested this PR and there're some test cases failed or needed improvement.

Please check the test report below for more information
https://vunguyenhung.notion.site/17497-zendesk-22abf548bb5e8105a5adef1abd937496

@Afstkla
Copy link
Contributor Author

Afstkla commented Jul 9, 2025

Hello everyone, I have tested this PR and there're some test cases failed or needed improvement.

Please check the test report below for more information https://vunguyenhung.notion.site/17497-zendesk-22abf548bb5e8105a5adef1abd937496

@vunguyenhung the response says "successfully updated ticket with ID 6", whereas your screenshot shows ticket number 2. Are you sure you checked the right ticket?

@jcortes jcortes moved this from Changes Required to Ready for QA in Component (Source and Action) Backlog Jul 9, 2025
@vunguyenhung vunguyenhung moved this from Ready for QA to In QA in Component (Source and Action) Backlog Jul 10, 2025
@vunguyenhung vunguyenhung moved this from In QA to Ready for Release in Component (Source and Action) Backlog Jul 10, 2025
@vunguyenhung
Copy link
Collaborator

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

Test report
https://vunguyenhung.notion.site/17497-zendesk-22abf548bb5e8105a5adef1abd937496

@jcortes jcortes self-requested a review July 10, 2025 14:36
@jcortes jcortes merged commit 32a419b into PipedreamHQ:master Jul 10, 2025
10 of 11 checks passed
@github-project-automation github-project-automation bot moved this from Ready for Release to Done in Component (Source and Action) Backlog Jul 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
User submitted Submitted by a user
Development

Successfully merging this pull request may close these issues.

Zendesk
5 participants