-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Asana - list-task-stories #17908
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 - list-task-stories #17908
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 3 Skipped Deployments
|
WalkthroughA new Asana action module was added to list stories for a given task, supporting optional filtering for comments, field selection, and result limits. The action uses Asana's API with pagination and accumulates results as specified. The package version was incremented to 0.8.0 to reflect this addition. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant ListTaskStoriesAction
participant AsanaAPI
User->>ListTaskStoriesAction: Provide taskId, options
loop Until maxResults or no more pages
ListTaskStoriesAction->>AsanaAPI: Fetch stories for taskId (with pagination)
AsanaAPI-->>ListTaskStoriesAction: Return stories, next_page token
alt commentsOnly enabled
ListTaskStoriesAction->>ListTaskStoriesAction: Filter stories by type "comment"
end
ListTaskStoriesAction->>ListTaskStoriesAction: Accumulate results
end
ListTaskStoriesAction-->>User: Return collected stories and summary
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Assessment against linked issues
Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (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). (3)
✨ Finishing Touches
🧪 Generate unit tests
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 (
|
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
🧹 Nitpick comments (1)
components/asana/actions/list-task-stories/list-task-stories.mjs (1)
56-61: Consider API rate limits and input validation.Setting
limitdirectly tomaxResultscould cause issues ifmaxResultsis very large, potentially hitting Asana API rate limits. Consider capping the limit to a reasonable page size (e.g., 100) and using the existing pagination logic.const params = { - limit: this.maxResults, + limit: Math.min(this.maxResults || 100, 100), opt_fields: this.optFields ? this.optFields?.join(",") : undefined, };
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (2)
components/asana/actions/list-task-stories/list-task-stories.mjs(1 hunks)components/asana/package.json(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: when developing pipedream components, do not add built-in node.js modules like `fs` to `package.json...
Learnt from: jcortes
PR: PipedreamHQ/pipedream#14935
File: components/sailpoint/package.json:15-18
Timestamp: 2024-12-12T19:23:09.039Z
Learning: When developing Pipedream components, do not add built-in Node.js modules like `fs` to `package.json` dependencies, as they are native modules provided by the Node.js runtime.
Applied to files:
components/asana/package.json
⏰ 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: Verify TypeScript components
- GitHub Check: Lint Code Base
🔇 Additional comments (6)
components/asana/package.json (1)
3-3: LGTM! Appropriate version bump for new functionality.The minor version increment from 0.7.4 to 0.8.0 correctly follows semantic versioning conventions for adding new backward-compatible functionality.
components/asana/actions/list-task-stories/list-task-stories.mjs (5)
1-8: LGTM! Well-structured module definition.The import, module metadata, and documentation reference are properly configured for a new Pipedream action.
23-42: LGTM! Props are well-configured.The remaining props (commentsOnly, optFields, maxResults) are properly typed with appropriate defaults and clear descriptions.
43-52: LGTM! Clean API method implementation.The
getStoriesForTaskmethod correctly constructs the Asana API path and passes through options appropriately.
65-91: LGTM! Solid pagination and filtering implementation.The pagination logic correctly handles the Asana API's
next_pagetoken, and the filtering logic properly identifies comments by checkingstory.type !== "comment". The count tracking efficiently stops processing whenmaxResultsis reached.
93-96: LGTM! Proper result handling and summary.The summary export and return statement correctly provide feedback and results to the user, following Pipedream action conventions.
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 @michelle0927 lgtm! Ready for QA!
Resolves #17794
Summary by CodeRabbit
New Features
Chores