-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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] Toggl Client & Project Creation #8973
Conversation
Co-authored-by: gitstart <[email protected]>
Co-authored-by: gitstart <[email protected]>
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
Hi @gitstart , thanks for your contribution! I made a few comments that should be checked before we can move forward with this.
workspace_id: this.workspace_id, | ||
}) | ||
|
||
response && $.export("$summary", "Successfully created new client"); |
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.
I think the response should be the return value of the step
response && $.export("$summary", "Successfully created new client"); | |
response && $.export("$summary", "Successfully created new client"); | |
return response; |
type: "string", | ||
label: "Name", | ||
}, | ||
workspace_id: { |
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.
We should use camelCase for prop names
import toggl from "../../toggl.app.mjs"; | ||
|
||
export default { | ||
name: "Create a new client", |
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.
name: "Create a new client", | |
name: "Create Client", |
version: "0.0.1", | ||
description: "Create a new Client [See docs here.](https://developers.track.toggl.com/docs/api/clients/index.html#post-create-client)", | ||
type: "action", | ||
key: "toggle-create-new-client", |
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.
key: "toggle-create-new-client", | |
key: "toggle-create-client", |
name: { | ||
type: "string", | ||
label: "Name", | ||
}, | ||
workspace_id: { |
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.
We should add descriptions, even if very brief, to these props if possible
type: 'boolean', | ||
label: 'Auto Estimates', | ||
optional: true, | ||
description: "whether the estimated hours are automatically calculated based on task estimations or manually fixed based on the value of 'estimated_hours' (premium functionality) ", |
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.
description: "whether the estimated hours are automatically calculated based on task estimations or manually fixed based on the value of 'estimated_hours' (premium functionality) ", | |
description: "Whether the estimated hours are automatically calculated based on task estimations or manually fixed based on the value of `Estimated Hours` (premium functionality) ", |
type: 'boolean', | ||
label: 'Estimated Hours', | ||
optional: true, | ||
description: "if auto_estimates is true then the sum of task estimations is returned, otherwise user inserted hours (premium functionality)" |
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.
description: "if auto_estimates is true then the sum of task estimations is returned, otherwise user inserted hours (premium functionality)" | |
description: "If `Auto Estimates` is true then the sum of task estimations is returned, otherwise user inserted hours (premium functionality)" |
rate: { | ||
type: 'integer', | ||
label: 'Rate', | ||
description: 'Hourly Rate. premium feature', | ||
optional: true, | ||
}, | ||
fixed_fee: { | ||
type: 'integer', | ||
label: 'Rate', | ||
description: 'Project fixed fee. premium feature', | ||
optional: true, | ||
}, | ||
currency: { | ||
type: 'string', | ||
label: 'Currency', | ||
description: 'Project currency. premium feature', | ||
optional: true, | ||
}, | ||
start_date: { | ||
type: 'string', | ||
label: 'Start Date', | ||
description: 'Start date of a project timeframe', | ||
}, | ||
end_date: { | ||
type: 'string', | ||
label: 'End Date', | ||
description: 'End date of a project timeframe', | ||
}, |
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.
camelCase and capitalization after periods
import toggl from "../../toggl.app.mjs"; | ||
|
||
export default { | ||
name: "Update a Project", |
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.
name: "Update a Project", | |
name: "Update Project", |
description: "Update project for given workspace. [See docs here.](https://developers.track.toggl.com/docs/api/projects#post-workspaceprojects)", | ||
type: "action", | ||
key: "toggle-update-project", | ||
props: { |
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.
These props also need to be updated with camelCase and proper capitalization
color: { | ||
type: 'string', | ||
label: 'Color', | ||
description: 'Project color (hex value in the form of #[0-9a-f]{6}.)', |
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.
description: 'Project color (hex value in the form of #[0-9a-f]{6}.)', | |
description: 'Project color (hex value in the form of #[0-9a-f]{6}.)', | |
optional: true |
WHAT
closes: #7928
🤖 Generated by Copilot at 8013b58
This pull request adds four new actions to the
toggl
component that allow the user to create and update clients and projects in toggl using the API. It also creates a new component for the dictionary API by copying and modifying the.gitignore
files from several existing components.🤖 Generated by Copilot at 8013b58
WHY
Actions:
Create new client / Update client
https://developers.track.toggl.com/docs/api/clients
Create project / Update project
https://developers.track.toggl.com/docs/api/projects
HOW
🤖 Generated by Copilot at 8013b58
components/toggl/common/constants.mjs
file (link)components/toggl/toggl.app.mjs
file that implements the API request using the_makeRequest
helper method (link).gitignore
file from various existing components and comment out the lines that ignore the.js
and.mjs
files to allow them to be tracked by git (link, link, link, link, link, link)Demo Video (Create & update client):
https://www.loom.com/share/791aebcf943a46a7a9e06e93835bfc28?sid=c70cb3fa-2fa6-4124-98c7-7efb75b38ff6
Demo Video (Create & update project):
https://www.loom.com/share/e6bfd8cbae81478e8eb17e7383174cf6?sid=233cb8da-1fbb-46d5-b4db-4ec2349c8b2a
This code was written and reviewed by GitStart Community. Growing great engineers, one PR at a time.