-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Asana & Freshdesk Updates #16080
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
Asana & Freshdesk Updates #16080
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 3 Skipped Deployments
|
WalkthroughThe changes update multiple Asana and Freshdesk components by introducing new error handling and parameter validation. In the Asana search tasks action, version and property modifications enforce that at least one of project, section, or assignee is provided while renaming some parameters to camelCase. Freshdesk actions now import a configuration error for explicit validation, with create-contact ensuring an email or phone is provided and create-ticket streamlining properties by making some optional and removing description fields. Additionally, package versions have been incremented. Changes
Sequence Diagram(s)sequenceDiagram
participant U as User
participant ST as Asana Search Tasks Action
participant API as Asana API
U->>ST: Execute search-tasks with parameters
ST->>ST: Validate input (ensure one of project, section, or assignee)
alt Validation passes
ST->>API: Call API with structured (camelCase) parameters
API-->>ST: Return task results
ST-->>U: Send search response
else Validation fails
ST-->>U: Throw ConfigurationError
end
sequenceDiagram
participant U as User
participant CC as Freshdesk Create Contact Action
participant API as Freshdesk API
U->>CC: Invoke create contact with email/phone
CC->>CC: Validate presence of email/phone
alt Validation passes
CC->>API: Call freshdesk.createContact with parameters
API-->>CC: Return contact info
CC-->>U: Send contact details
else Validation fails
CC-->>U: Throw ConfigurationError
end
sequenceDiagram
participant U as User
participant CT as Freshdesk Create Ticket Action
participant API as Freshdesk API
U->>CT: Execute create ticket with data
CT->>CT: Validate and restructure input (remove description fields)
CT->>API: Call createTicket with companyId and updated data
API-->>CT: Return ticket response
CT-->>U: Send ticket details
Assessment against linked issues
Possibly related PRs
Suggested labels
Suggested reviewers
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/freshdesk/freshdesk.app.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/freshdesk/actions/create-company/create-company.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/freshdesk/actions/get-ticket/get-ticket.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 ignored due to path filters (1)
📒 Files selected for processing (6)
✅ Files skipped from review due to trivial changes (5)
⏰ Context from checks skipped due to timeout of 90000ms (3)
🔇 Additional comments (2)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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 (
|
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: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
components/asana/actions/search-tasks/search-tasks.mjs(3 hunks)components/asana/package.json(1 hunks)components/freshdesk/actions/create-contact/create-contact.mjs(2 hunks)components/freshdesk/actions/create-ticket/create-ticket.mjs(3 hunks)components/freshdesk/package.json(1 hunks)
🧰 Additional context used
🪛 GitHub Check: Lint Code Base
components/asana/actions/search-tasks/search-tasks.mjs
[warning] 13-13:
Component prop project must have a label. See https://pipedream.com/docs/components/guidelines/#props
[warning] 13-13:
Component prop project must have a description. See https://pipedream.com/docs/components/guidelines/#props
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: pnpm publish
- GitHub Check: Verify TypeScript components
- GitHub Check: Publish TypeScript components
🔇 Additional comments (22)
components/freshdesk/package.json (1)
3-3: Version update is appropriateThe version increment from 0.1.0 to 0.1.1 correctly reflects the backward-compatible changes made to the Freshdesk components in this PR.
components/asana/package.json (1)
3-3: Version update is appropriateThe version increment from 0.7.1 to 0.7.2 correctly reflects the backward-compatible changes made to the Asana components in this PR.
components/freshdesk/actions/create-contact/create-contact.mjs (5)
2-2: Good addition of ConfigurationError importAdding the ConfigurationError import from @pipedream/platform allows for more explicit error handling with clearer feedback to users.
8-8: Version increment is appropriateThe version increment from 0.0.2 to 0.0.3 correctly reflects the backward-compatible improvements made to error handling.
45-46: Improved code clarityExplicitly including freshdesk in the destructuring makes the code more maintainable by clarifying which object methods are being called.
48-50: Good validation implementationThis validation ensures users provide at least one contact method (email or phone) before attempting to create a contact, preventing API errors and providing a better user experience with clear error messaging.
52-52: Improved code clarityExplicitly referencing freshdesk.createContact improves code readability and maintenance.
components/freshdesk/actions/create-ticket/create-ticket.mjs (4)
7-7: Version increment is appropriateThe version increment from 0.0.3 to 0.0.4 correctly reflects the backward-compatible changes made to the component.
32-32: Improved flexibilityMaking the priority field optional gives users more flexibility when creating tickets.
61-62: Simplified destructuringRemoving descriptionText from the destructuring correctly aligns with the removal of this property from the component.
34-38:❓ Verification inconclusive
Subject field validation
The subject field appears to be required based on this code, but the AI summary suggests it was made optional. Consider adding "optional: true" if this field should be optional.
🏁 Script executed:
#!/bin/bash # Check if the subject field is required in the Freshdesk API curl -s https://developers.freshdesk.com/api/#create_ticket | grep -A 10 "Mandatory parameters"Length of output: 97
Subject Field Configuration Verification
- The current code defines the subject field as a string without the "optional: true" attribute, which implies it is required. However, the AI summary mentioned it was made optional.
- The automated check via Freshdesk’s API documentation did not return any output regarding mandatory parameters. Please verify manually against the latest Freshdesk API guidelines.
- If the subject field is indeed optional, update its configuration by adding
"optional: true". Otherwise, document that it is required per the API requirements.components/asana/actions/search-tasks/search-tasks.mjs (11)
3-3: IntroducedConfigurationErrorfor improved error handling
Importing from"@pipedream/platform"aligns with the newly added validations.
9-9: Version bump to 0.3.2
This minor version increment appropriately reflects the new validations and parameter constraints.
38-38: Clarified dependency on Project for Section
This descriptive update helps users understand that defining a Project is needed to list Section options.
48-48:completedSincerenamed fromcompleted_since
Renaming to camelCase conforms to JavaScript naming standards while mapping correctly to Asana’s parameter requirements.
54-54:modifiedSincerenamed frommodified_since
Continuing the camelCase style ensures consistency across parameters.
62-64: Validate required search criteria
Throwing aConfigurationErrorwhen none of Project, Section, or Assignee is provided ensures at least one filter is specified.
66-68: Disallow combining Assignee with Project/Section
Enforcing this restriction avoids ambiguous search queries.
70-73: Initialize request parameters
Populatingparamswithcompleted_sinceandmodified_sincecorrectly matches Asana’s API fields.
81-81: Fallback to Project
Defaulting toprojectwhen neitherassigneenorsectionis specified balances the search criteria.
85-85: Invokingthis.asana.getTaskswithparams
Passing the constructedparamsobject is consistent with the Asana API's requirements.
75-78:✅ Verification successful
Set Assignee-related parameters
Including theworkspaceproperty is crucial for filtering by assignee. Verify thatworkspaceis guaranteed to be present incommon.props.
🏁 Script executed:
#!/bin/bash # Description: Verify that `workspace` is declared in common.props for Asana fd common.mjs | xargs -I {} grep -A 5 'workspace.*:' {}Length of output: 1264
Workspace property verified for Asana integration
The code at lines 75–78 in
components/asana/actions/search-tasks/search-tasks.mjscorrectly assignsthis.workspacetoparams.workspacewhen an assignee is provided. Our search throughcommon.mjsconfirms that a dedicatedworkspaceproperty is present for Asana (as shown by the definition with label "Workspace", description "Gid of a workspace", and corresponding propDefinition). This ensures that filtering by assignee correctly leverages the workspace parameter.No changes are needed.
Resolves #16061
Summary by CodeRabbit
New Features
Chores