-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Add internal notes support to Gorgias OAuth integration #17605
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
base: master
Are you sure you want to change the base?
Add internal notes support to Gorgias OAuth integration #17605
Conversation
- Add channel prop to create-ticket-message action with internal-note support - Add conditional logic to skip sender/receiver validation for internal notes - Create internal-note-created webhook source for monitoring internal note events - Add JSDoc documentation to all methods - Update package.json version
@seynadio is attempting to deploy a commit to the Pipedreamers Team on Vercel. A member of the Team first needs to authorize it. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
WalkthroughThe changes introduce support for handling "internal-note" messages in the Gorgias OAuth integration. A new source component emits events when internal notes are created, and the ticket message action is updated to handle the "internal-note" channel, affecting prop visibility, validation, and message payload structure. Package versions are incremented accordingly. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Action (Create Ticket Message)
participant Gorgias API
User->>Action (Create Ticket Message): Provide message details (with channel)
alt channel == "internal-note"
Action (Create Ticket Message)->>Gorgias API: Create message (channel: internal-note, minimal payload)
else channel != "internal-note"
Action (Create Ticket Message)->>Gorgias API: Create message (full payload)
end
Gorgias API-->>Action (Create Ticket Message): Confirmation
Action (Create Ticket Message)-->>User: Summary (internal note or ticket message created)
sequenceDiagram
participant Gorgias API
participant Source (New Internal Note)
participant User
Gorgias API-->>Source (New Internal Note): Event (TICKET_MESSAGE_CREATED, channel: internal-note)
Source (New Internal Note)->>Source (New Internal Note): Check relevance (ticketId, sender)
alt Relevant
Source (New Internal Note)-->>User: Emit internal note event
else Not relevant
Source (New Internal Note)-->>User: No event emitted
end
Estimated code review effort
Poem
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
components/gorgias_oauth/actions/create-ticket-message/create-ticket-message.mjsOops! Something went wrong! :( ESLint: 8.57.1 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs components/gorgias_oauth/sources/internal-note-created/internal-note-created.mjsOops! Something went wrong! :( ESLint: 8.57.1 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
⏰ 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)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed 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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Thank you so much for submitting this! We've added it to our backlog to review, and our team has been notified. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution! LGTM! Ready for QA
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 |
Add empty deploy() hook to prevent base class from attempting to process historical events, matching the pattern used in ticket-message-created source. This resolves the "processHistoricalEvent is not implemented" error. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1cb9a36
to
2cb1404
Compare
Hi @vunguyenhung , just fixed the failing test. Also, would you be so kind as to verify the internal note creation (the new feature that was introduced in this PR) actually works? |
- Fix multiline-ternary formatting in create-ticket-message.mjs - Remove unused constants import from internal-note-created.mjs - Add missing newline at end of internal-note-created.mjs 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
0c891c0
to
1eb8c05
Compare
Summary
Changes
channel="internal-note"
with conditional validationTest plan
Summary by CodeRabbit