Skip to content

Conversation

@michelle0927
Copy link
Collaborator

@michelle0927 michelle0927 commented Nov 26, 2025

Resolves #19170
Resolves #19169

Summary by CodeRabbit

  • New Features
    • Added actions to manage ticket tags: list, add, and set tags on tickets
    • Added ability to list and update ticket custom field values
    • Added action to retrieve a macro by ID
    • Enhanced Gorgias OAuth integration with new methods for tag and field management

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

@vercel
Copy link

vercel bot commented Nov 26, 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 26, 2025 6:10pm
pipedream-docs-redirect-do-not-edit Ignored Ignored Nov 26, 2025 6:10pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 26, 2025

Walkthrough

This pull request introduces six new actions for ticket and macro management in the Gorgias OAuth component, adds corresponding API methods to the app client, and bumps versions across multiple existing actions and sources. The package version is incremented from 0.7.0 to 0.8.0.

Changes

Cohort / File(s) Summary
New ticket tag management actions
components/gorgias_oauth/actions/add-ticket-tags/add-ticket-tags.mjs, components/gorgias_oauth/actions/list-ticket-tags/list-ticket-tags.mjs, components/gorgias_oauth/actions/set-ticket-tags/set-ticket-tags.mjs
New actions for listing, adding, and setting tags on tickets; each includes ticketId and tagIds props with corresponding Gorgias API integrations.
New ticket field values actions
components/gorgias_oauth/actions/list-ticket-field-values/list-ticket-field-values.mjs, components/gorgias_oauth/actions/update-ticket-field-values/update-ticket-field-values.mjs
New actions for listing and updating custom field values on tickets. The update action uses additionalProps to dynamically generate props based on custom fields, with special handling for boolean, number, and dropdown field types.
New macro action
components/gorgias_oauth/actions/get-macro/get-macro.mjs
New action to retrieve a macro by ID from Gorgias.
App client enhancements
components/gorgias_oauth/gorgias_oauth.app.mjs
Adds six new public methods: listTicketTags, addTicketTags, setTicketTags, listTicketFieldValues, listCustomFields, and updateTicketFieldValues, each routing to corresponding Gorgias API endpoints.
Action version bumps
components/gorgias_oauth/actions/{create-customer,create-macro,create-ticket-message,create-ticket,delete-macro,get-ticket-message,get-ticket,list-macros,list-messages,list-ticket-messages,list-tickets,retrieve-customer,update-customer,update-macro,update-ticket,internal-note-created}/\\*
Patch/minor version increments across 16 existing actions (e.g., 0.0.9 → 0.0.10, 0.0.3 → 0.0.4); no functional logic changes.
Source version bumps
components/gorgias_oauth/sources/{internal-note-created,macro-updated,new-macro-created,ticket-created,ticket-message-created,ticket-updated}/\\*.mjs
Version increments for five sources (e.g., 0.0.3 → 0.0.4, 0.1.9 → 0.1.10); no behavioral changes.
Package version update
components/gorgias_oauth/package.json
Version bumped from 0.7.0 to 0.8.0.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Action as New Tag Action<br/>(add/list/set)
    participant App as Gorgias App Client
    participant API as Gorgias API
    
    User->>Action: Invoke with ticketId & tagIds
    Action->>App: Call tagManagement method<br/>(listTicketTags/addTicketTags/setTicketTags)
    App->>API: HTTP GET/POST/PUT<br/>/tickets/{ticketId}/tags
    API-->>App: Response (tags array/count)
    App-->>Action: Return response
    Action->>Action: Export summary<br/>(success message with tag count)
    Action-->>User: Return API response
Loading
sequenceDiagram
    participant User
    participant Action as update-ticket-field-values
    participant App as Gorgias App Client
    participant API as Gorgias API
    
    User->>Action: Invoke with ticketId & field values
    Action->>App: listCustomFields()
    App->>API: GET /custom-fields
    API-->>App: Custom field definitions
    Action->>App: listTicketFieldValues(ticketId)
    App->>API: GET /tickets/{ticketId}/custom-fields
    API-->>App: Existing field values
    Action->>Action: Build data array<br/>(merge new + existing values,<br/>apply type conversions)
    Action->>App: updateTicketFieldValues(ticketId, data)
    App->>API: POST /tickets/{ticketId}/custom-fields
    API-->>App: Success response
    App-->>Action: Response
    Action->>Action: Export summary
    Action-->>User: Return response
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25–30 minutes

  • Areas requiring extra attention:
    • update-ticket-field-values.mjs: Complex additionalProps logic with dynamic prop generation, field type mapping (boolean/number/dropdown), and data construction merging existing and new values.
    • gorgias_oauth.app.mjs: Verify six new methods have correct endpoint routing, parameter passing, and HTTP method selection (GET for list operations, POST for add, PUT for set/update).
    • New action patterns: Confirm the six new action modules follow consistent patterns with existing actions (metadata structure, prop definitions, run function signatures).

Possibly related PRs

  • PipedreamHQ/pipedream#19027: Modifies Gorgias actions for ticket message operations (list-ticket-messages, get-ticket-message), overlapping with version bump changes in this PR.

Suggested labels

User submitted

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 2 inconclusive)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description only provides issue references without explaining the changes, failing to follow the required template structure with a WHY section. Add a WHY section explaining the purpose and context of implementing these new Gorgias actions as specified in the template.
Title check ❓ Inconclusive The title 'Gorgias - new components' is partially related to the changes but lacks specificity about which new components are being added. Consider using a more descriptive title like 'Add Gorgias macro and ticket tags actions' to better reflect the specific new functionality.
Out of Scope Changes check ❓ Inconclusive Version bumps in existing actions and sources appear to be scoped maintenance updates, but the comprehensive version updates across many files may warrant clarification of their necessity. Clarify whether the version bumps across 15+ existing actions and sources are necessary or if they should be separated into a distinct maintenance PR.
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed All linked issue objectives are met: get-macro action implements #19170 requirement; list/add/set ticket tags and list/update ticket field values actions fully implement #19169 requirements with matching API endpoints.
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 issue-19170

📜 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 10ad254 and 4a6b3ae.

📒 Files selected for processing (29)
  • components/gorgias_oauth/actions/add-ticket-tags/add-ticket-tags.mjs (1 hunks)
  • components/gorgias_oauth/actions/create-customer/create-customer.mjs (1 hunks)
  • components/gorgias_oauth/actions/create-macro/create-macro.mjs (1 hunks)
  • components/gorgias_oauth/actions/create-ticket-message/create-ticket-message.mjs (1 hunks)
  • components/gorgias_oauth/actions/create-ticket/create-ticket.mjs (1 hunks)
  • components/gorgias_oauth/actions/delete-macro/delete-macro.mjs (1 hunks)
  • components/gorgias_oauth/actions/get-macro/get-macro.mjs (1 hunks)
  • components/gorgias_oauth/actions/get-ticket-message/get-ticket-message.mjs (1 hunks)
  • components/gorgias_oauth/actions/get-ticket/get-ticket.mjs (1 hunks)
  • components/gorgias_oauth/actions/list-macros/list-macros.mjs (1 hunks)
  • components/gorgias_oauth/actions/list-messages/list-messages.mjs (1 hunks)
  • components/gorgias_oauth/actions/list-ticket-field-values/list-ticket-field-values.mjs (1 hunks)
  • components/gorgias_oauth/actions/list-ticket-messages/list-ticket-messages.mjs (1 hunks)
  • components/gorgias_oauth/actions/list-ticket-tags/list-ticket-tags.mjs (1 hunks)
  • components/gorgias_oauth/actions/list-tickets/list-tickets.mjs (1 hunks)
  • components/gorgias_oauth/actions/retrieve-customer/retrieve-customer.mjs (1 hunks)
  • components/gorgias_oauth/actions/set-ticket-tags/set-ticket-tags.mjs (1 hunks)
  • components/gorgias_oauth/actions/update-customer/update-customer.mjs (1 hunks)
  • components/gorgias_oauth/actions/update-macro/update-macro.mjs (1 hunks)
  • components/gorgias_oauth/actions/update-ticket-field-values/update-ticket-field-values.mjs (1 hunks)
  • components/gorgias_oauth/actions/update-ticket/update-ticket.mjs (1 hunks)
  • components/gorgias_oauth/gorgias_oauth.app.mjs (3 hunks)
  • components/gorgias_oauth/package.json (1 hunks)
  • components/gorgias_oauth/sources/internal-note-created/internal-note-created.mjs (1 hunks)
  • components/gorgias_oauth/sources/macro-updated/macro-updated.mjs (1 hunks)
  • components/gorgias_oauth/sources/new-macro-created/new-macro-created.mjs (1 hunks)
  • components/gorgias_oauth/sources/ticket-created/ticket-created.mjs (1 hunks)
  • components/gorgias_oauth/sources/ticket-message-created/ticket-message-created.mjs (1 hunks)
  • components/gorgias_oauth/sources/ticket-updated/ticket-updated.mjs (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 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/gorgias_oauth/actions/create-customer/create-customer.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/gorgias_oauth/actions/list-ticket-messages/list-ticket-messages.mjs
🧬 Code graph analysis (4)
components/gorgias_oauth/actions/list-ticket-tags/list-ticket-tags.mjs (6)
components/gorgias_oauth/actions/add-ticket-tags/add-ticket-tags.mjs (1)
  • response (34-40)
components/gorgias_oauth/actions/get-macro/get-macro.mjs (1)
  • response (24-27)
components/gorgias_oauth/actions/list-ticket-field-values/list-ticket-field-values.mjs (1)
  • response (24-27)
components/gorgias_oauth/actions/set-ticket-tags/set-ticket-tags.mjs (1)
  • response (34-40)
components/gorgias_oauth/actions/update-ticket-field-values/update-ticket-field-values.mjs (1)
  • response (82-86)
components/gorgias_oauth/gorgias_oauth.app.mjs (1)
  • response (300-300)
components/gorgias_oauth/actions/list-ticket-field-values/list-ticket-field-values.mjs (6)
components/gorgias_oauth/actions/add-ticket-tags/add-ticket-tags.mjs (1)
  • response (34-40)
components/gorgias_oauth/actions/get-macro/get-macro.mjs (1)
  • response (24-27)
components/gorgias_oauth/actions/list-ticket-tags/list-ticket-tags.mjs (1)
  • response (24-27)
components/gorgias_oauth/actions/set-ticket-tags/set-ticket-tags.mjs (1)
  • response (34-40)
components/gorgias_oauth/actions/update-ticket-field-values/update-ticket-field-values.mjs (1)
  • response (82-86)
components/gorgias_oauth/gorgias_oauth.app.mjs (1)
  • response (300-300)
components/gorgias_oauth/actions/set-ticket-tags/set-ticket-tags.mjs (5)
components/gorgias_oauth/actions/add-ticket-tags/add-ticket-tags.mjs (1)
  • response (34-40)
components/gorgias_oauth/actions/get-macro/get-macro.mjs (1)
  • response (24-27)
components/gorgias_oauth/actions/list-ticket-tags/list-ticket-tags.mjs (1)
  • response (24-27)
components/gorgias_oauth/actions/update-ticket-field-values/update-ticket-field-values.mjs (1)
  • response (82-86)
components/gorgias_oauth/gorgias_oauth.app.mjs (1)
  • response (300-300)
components/gorgias_oauth/actions/get-macro/get-macro.mjs (6)
components/gorgias_oauth/actions/add-ticket-tags/add-ticket-tags.mjs (1)
  • response (34-40)
components/gorgias_oauth/actions/list-ticket-field-values/list-ticket-field-values.mjs (1)
  • response (24-27)
components/gorgias_oauth/actions/list-ticket-tags/list-ticket-tags.mjs (1)
  • response (24-27)
components/gorgias_oauth/actions/set-ticket-tags/set-ticket-tags.mjs (1)
  • response (34-40)
components/gorgias_oauth/actions/update-ticket-field-values/update-ticket-field-values.mjs (1)
  • response (82-86)
components/gorgias_oauth/gorgias_oauth.app.mjs (1)
  • response (300-300)
⏰ 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). (3)
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Lint Code Base
🔇 Additional comments (29)
components/gorgias_oauth/actions/create-ticket-message/create-ticket-message.mjs (1)

10-10: Version bump aligns with release cadence — no functional changes.

The version has been incremented from 0.0.6 to 0.0.7 as part of the broader package release (0.8.0). No changes to props, run logic, or runtime behavior.

components/gorgias_oauth/actions/get-ticket-message/get-ticket-message.mjs (1)

7-7: Version bump is consistent with release changes

Updating the action version metadata here looks correct and aligns with the broader Gorgias OAuth package bump; no behavioral concerns.

components/gorgias_oauth/package.json (1)

3-3: Package version bump looks appropriate

Incrementing the package version to 0.8.0 is consistent with the set of new actions and metadata changes in this PR.

components/gorgias_oauth/sources/new-macro-created/new-macro-created.mjs (1)

9-9: Source version metadata update is safe

The source’s version increment reflects the release without altering runtime behavior; this is fine.

components/gorgias_oauth/sources/internal-note-created/internal-note-created.mjs (1)

10-10: Internal note source version bump is OK

Only the version field changed; existing event filtering and processing remain intact.

components/gorgias_oauth/actions/list-ticket-messages/list-ticket-messages.mjs (1)

7-7: List Ticket Messages action version updated correctly

The metadata version change is aligned with the rest of the Gorgias actions and doesn’t affect behavior.

components/gorgias_oauth/actions/get-ticket/get-ticket.mjs (1)

7-7: Get Ticket action version bump is appropriate

This is a simple metadata increment; the action logic remains unchanged and correct.

components/gorgias_oauth/actions/update-customer/update-customer.mjs (1)

13-13: Update Customer action version increment looks good

Raising the action version to 0.0.10 matches the broader set of customer-related changes and doesn’t introduce behavioral risk.

components/gorgias_oauth/sources/macro-updated/macro-updated.mjs (1)

9-9: Macro Updated source version bump is consistent

Only the version field changed; existing event handling remains the same and looks correct.

components/gorgias_oauth/actions/list-macros/list-macros.mjs (1)

7-7: LGTM! Clean version bump.

The version update aligns with the coordinated 0.8.0 release. No logic or behavior changes detected.

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

8-8: LGTM! Version bump only.

Clean metadata update for the 0.8.0 release. No functional changes.

components/gorgias_oauth/sources/ticket-created/ticket-created.mjs (1)

10-10: LGTM! Coordinated version update.

Version bump aligns with the broader 0.8.0 release. No behavior changes.

components/gorgias_oauth/actions/delete-macro/delete-macro.mjs (1)

7-7: LGTM! Version metadata updated.

Clean version bump for the 0.8.0 release. No logic changes.

components/gorgias_oauth/actions/create-customer/create-customer.mjs (1)

8-8: LGTM! Version updated for release.

Version bump is consistent with the coordinated 0.8.0 release. No functional changes.

components/gorgias_oauth/sources/ticket-message-created/ticket-message-created.mjs (1)

11-11: LGTM! Clean version bump.

Version update aligns with the 0.8.0 release. No behavior changes detected.

components/gorgias_oauth/actions/update-macro/update-macro.mjs (1)

9-9: LGTM! Version bump for release.

Clean metadata update consistent with the 0.8.0 release. No functional changes.

components/gorgias_oauth/actions/list-messages/list-messages.mjs (1)

7-7: LGTM! Version metadata updated.

Version bump aligns with the coordinated 0.8.0 release. No logic or behavior changes.

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

7-7: LGTM!

Version bump aligns with the broader release versioning sweep across actions.

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

7-7: LGTM!

Version bump aligns with the broader release versioning sweep across actions.

components/gorgias_oauth/actions/retrieve-customer/retrieve-customer.mjs (1)

7-7: LGTM!

Version bump aligns with the broader release versioning sweep across actions.

components/gorgias_oauth/actions/create-macro/create-macro.mjs (1)

9-9: LGTM!

Version bump aligns with the broader release versioning sweep across actions.

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

10-10: LGTM!

Version bump aligns with the broader release versioning sweep across sources.

components/gorgias_oauth/actions/list-ticket-tags/list-ticket-tags.mjs (1)

3-32: List ticket tags action looks consistent and safe

Action metadata, props, call to this.gorgias.listTicketTags, and defensive summary generation all match existing patterns; no changes requested.

components/gorgias_oauth/actions/set-ticket-tags/set-ticket-tags.mjs (1)

3-45: Set ticket tags action wiring looks good

Props, destructive annotations, payload shape { ids: this.tagIds }, and summary formatting are coherent and aligned with the add-ticket-tags pattern.

components/gorgias_oauth/actions/get-macro/get-macro.mjs (1)

3-30: Get macro action matches existing patterns

The props and getMacro invocation are straightforward and consistent with other Gorgias actions; summary is clear. No changes needed.

components/gorgias_oauth/actions/add-ticket-tags/add-ticket-tags.mjs (1)

3-45: Add ticket tags action is well-structured

Metadata, props, payload { ids: this.tagIds }, and pluralized summary are consistent with the rest of the Gorgias actions; no issues found.

components/gorgias_oauth/actions/list-ticket-field-values/list-ticket-field-values.mjs (1)

3-32: List ticket field values action aligns with existing list patterns

The props and run implementation follow the same structure as other list-style actions, with a safe, informative summary. Looks good as-is.

components/gorgias_oauth/actions/update-ticket-field-values/update-ticket-field-values.mjs (1)

3-90: Dynamic ticket field update logic is solid

Dynamic prop generation, preservation of existing values when inputs are left undefined, and type-aware coercion for numeric fields make this a robust update action; no functional issues stand out.

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

526-574: HTTP method for updateTicketFieldValues is correct—no change needed.

The implementation correctly uses method: "PUT" for the /tickets/{ticketId}/custom-fields endpoint. Official Gorgias API documentation specifies PUT as the correct HTTP verb for updating ticket custom fields. The review comment's concern about a POST vs. PUT mismatch was based on a misreading of the PR objective text; the code is already aligned with the officially supported HTTP method.


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.

@michelle0927 michelle0927 marked this pull request as ready for review November 26, 2025 18:11
Copy link
Collaborator

@luancazarine luancazarine left a comment

Choose a reason for hiding this comment

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

Hi @michelle0927, LGTM! Ready for QA!

@vunguyenhung
Copy link
Collaborator

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

Please check test reports below for more information:

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] Gorgias - Macros [ACTION] Gorgias - ticket tags

4 participants