-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Support query parameters in Get Time Entries action #16540
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?
Support query parameters in Get Time Entries action #16540
Conversation
…ing to Get Time Entries action (PipedreamHQ#16539)
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
@kazuya-shimatani is attempting to deploy a commit to the Pipedreamers Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughThe Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant GetTimeEntriesAction
participant TogglAPI
User->>GetTimeEntriesAction: Provide optional filters (startDate, endDate, etc.)
GetTimeEntriesAction->>GetTimeEntriesAction: Build params object from inputs
GetTimeEntriesAction->>TogglAPI: getTimeEntries(params)
TogglAPI-->>GetTimeEntriesAction: Return filtered time entries
GetTimeEntriesAction-->>User: Return response
Assessment against linked issues
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/toggl/actions/get-time-entries/get-time-entries.mjsOops! Something went wrong! :( ESLint: 8.57.1 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs ✨ 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. |
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:
|
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: 0
🧹 Nitpick comments (2)
components/toggl/actions/get-time-entries/get-time-entries.mjs (2)
11-46
: Good implementation of optional query parameters!The addition of these optional properties aligns well with the Toggl Track API documentation. The properties are properly typed, labeled, and include clear descriptions explaining their purpose and format requirements.
One suggestion: Consider adding basic input validation for date formats and timestamp values to prevent API errors from malformed inputs. This would improve the user experience by catching errors early.
56-58
: Properly implemented API call with parameters.The parameters object is correctly passed to the getTimeEntries method. This implementation allows for flexible filtering of time entries based on user input.
Consider updating the action description at line 7 to mention the new filtering capabilities, as it currently only states "Get the last thousand time entries" without mentioning the available filtering options.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
components/toggl/actions/get-time-entries/get-time-entries.mjs
(1 hunks)
🔇 Additional comments (1)
components/toggl/actions/get-time-entries/get-time-entries.mjs (1)
49-55
: Good parameter handling approach.The implementation correctly:
- Creates an empty params object
- Conditionally adds parameters only when values are provided
- Maps camelCase property names to snake_case parameter names for the API
- Performs explicit type checking for boolean properties
This ensures the API only receives parameters that have actual values, matching the Toggl API expectations.
Closes
Closes #16539
Changes
components/toggl/actions/get-time-entries/get-time-entries.mjs
params
in the API requestNotes
Summary by CodeRabbit