-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Freshdesk - download-attachment #18507
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
WalkthroughAdds a new Freshdesk action to download a ticket attachment (fetches ticket, selects attachment, downloads binary, writes to /tmp) and bumps the Freshdesk component version to 0.5.0. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant Action as Download Attachment Action
participant Freshdesk as Freshdesk API
participant HTTP as axios
participant FS as fs (/tmp)
User->>Action: invoke run({ ticketId, attachmentId, syncDir })
Action->>Freshdesk: getTicket(ticketId)
Freshdesk-->>Action: ticket (with attachments[])
Action->>Action: find attachment by id (or prompt via listTicketAttachments)
Action->>HTTP: GET attachment.attachment_url (responseType: arraybuffer)
HTTP-->>Action: binary data (arraybuffer)
Action->>Action: Buffer.from(arraybuffer)
Action->>FS: writeFileSync(/tmp/<name>, Buffer)
FS-->>Action: write confirmed
Action-->>User: return [name, path] and attachment metadata
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
⏰ 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)
🔇 Additional comments (2)
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. 🧪 Early access (Sonnet 4.5): enabledWe 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:
Comment |
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.
Actionable comments posted: 5
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
components/freshdesk/actions/download-attachment/download-attachment.mjs(1 hunks)components/freshdesk/package.json(1 hunks)
⏰ 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: Lint Code Base
- GitHub Check: Verify TypeScript components
🔇 Additional comments (5)
components/freshdesk/package.json (1)
3-3: LGTM! Appropriate version bump for new feature.The minor version increment from 0.4.0 to 0.5.0 correctly reflects the addition of a new action capability.
components/freshdesk/actions/download-attachment/download-attachment.mjs (4)
1-10: LGTM! Well-structured action metadata.The imports, key, name, description, and version are appropriate for this action.
13-18: LGTM! Proper prop definition for ticket selection.The
ticketIdprop correctly leverages the prop definition from the Freshdesk app.
19-32: LGTM! Dynamic attachment selection.The
attachmentIdprop with async options provides a good UX by allowing users to select from available attachments.
40-46: LGTM! Clean method to fetch ticket attachments.The
listTicketAttachmentsmethod appropriately delegates to the Freshdesk app'sgetTicketmethod and returns the attachments array.
Resolves #18491
Summary by CodeRabbit
New Features
Chores