-
Notifications
You must be signed in to change notification settings - Fork 5.5k
[ACTION] Trengo - Add Helpcenter API Methods and List Help Centers Action #19273
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
[ACTION] Trengo - Add Helpcenter API Methods and List Help Centers Action #19273
Conversation
Added new API methods for Trengo Helpcenter: - getHelpCenter: Get a specific help center - getCategories: List all categories in a help center - getCategory: Get a specific category - getBlocks: List all blocks in a help center - getBlock: Get a specific block - getArticle: Get a specific article Resolves PipedreamHQ#19172
This file defines an action to list all help centers with optional max results.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
Thank you so much for submitting this! We've added it to our backlog to review, and our team has been notified. |
|
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:
|
WalkthroughIntroduces a new Trengo integration action module to list help centers, leveraging the Trengo API endpoint. The action accepts an optional maxResults parameter to limit the number of results returned. Additionally, the package version is incremented from 0.5.0 to 0.6.0 to reflect this new functionality. Changes
Sequence DiagramsequenceDiagram
actor User
participant Action as list-help-centers
participant Utils as utils
participant API as Trengo API
participant Stream as Result Stream
User->>Action: Invoke with maxResults parameter
Action->>Utils: Call getResourcesStream()
Utils->>API: Call getHelpCenters()
API-->>Stream: Stream help center data
Stream-->>Utils: Emit results
Utils->>Action: Accumulate up to maxResults
Action->>Action: Export summary with count
Action-->>User: Return collected help centers array
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (1)
🔇 Additional comments (1)
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. 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: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
components/trengo/trengo.app.mjs (1)
365-421: Missing comma afterattachLabelbreaks themethodsobjectThere’s no comma after the
attachLabelmethod before the// Helpcenter API methodscomment and the new methods. This makes themethodsobject invalid and explains the Biome parse errors cascading from this region.Add a comma after the closing brace of
attachLabel:attachLabel({ ticketId, ...args }) { return this._makeRequest({ method: "POST", path: `/tickets/${ticketId}/labels`, ...args, }); - // Helpcenter API methods + }, + // Helpcenter API methodsWith that fixed, the new Helpcenter methods (getHelpCenter / getCategories / getCategory / getBlocks / getBlock / getArticle) follow the existing
_makeRequestpattern and look consistent with the Trengo API surface you described.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (2)
components/trengo/actions/list-help-centers/list-help-centers.mjs(1 hunks)components/trengo/trengo.app.mjs(1 hunks)
🧰 Additional context used
🪛 Biome (2.1.2)
components/trengo/trengo.app.mjs
[error] 376-376: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 381-382: Expected a statement but instead found ',
getCategories('.
Expected a statement here.
(parse)
[error] 383-383: Expected an expression but instead found '...'.
Expected an expression here.
(parse)
[error] 384-384: Expected a statement but instead found ')'.
Expected a statement here.
(parse)
[error] 389-390: Expected a statement but instead found ',
getCategory('.
Expected a statement here.
(parse)
[error] 391-391: Expected an expression but instead found '...'.
Expected an expression here.
(parse)
[error] 392-392: Expected a statement but instead found ')'.
Expected a statement here.
(parse)
[error] 397-398: Expected a statement but instead found ',
getBlocks('.
Expected a statement here.
(parse)
[error] 399-399: Expected an expression but instead found '...'.
Expected an expression here.
(parse)
[error] 400-400: Expected a statement but instead found ')'.
Expected a statement here.
(parse)
[error] 405-406: Expected a statement but instead found ',
getBlock('.
Expected a statement here.
(parse)
[error] 407-407: Expected an expression but instead found '...'.
Expected an expression here.
(parse)
[error] 408-408: Expected a statement but instead found ')'.
Expected a statement here.
(parse)
[error] 413-414: Expected a statement but instead found ',
getArticle('.
Expected a statement here.
(parse)
[error] 415-415: Expected an expression but instead found '...'.
Expected an expression here.
(parse)
[error] 416-416: Expected a statement but instead found ')'.
Expected a statement here.
(parse)
[error] 421-421: Expected a statement but instead found ','.
Expected a statement here.
(parse)
This fixes the Biome parse error caused by a missing closing brace and comma after the attachLabel method. The methods object was invalid because the attachLabel method was not properly terminated before the Helpcenter API methods.
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.
michelle0927
left a 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.
LGTM! Ready for QA!
|
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:
|
|
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:
|
jcortes
left a 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.
Hi @SIVALANAGASHANKARNIVAS lgtm! Ready for QA!
|
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:
|
|
Hi @SIVALANAGASHANKARNIVAS and @vunguyenhung this PR is going to be closed in favor of #19277 |
WHY
This PR addresses issue #19172 by adding Helpcenter API support for Trengo.
Summary
Added new Helpcenter API methods to
trengo.app.mjsand created a new action:API Methods Added:
getHelpCenter- Get a specific help center by IDgetCategories- List all categories in a help centergetCategory- Get a specific category by IDgetBlocks- List all blocks in a help centergetBlock- Get a specific block by IDgetArticle- Get a specific article by IDActions Added:
list-help-centers- Lists all help centers with optional max results filterAPI Documentation
Resolves #19172
Summary by CodeRabbit
Release Notes
New Features
Version Update
✏️ Tip: You can customize this high-level summary in your review settings.