Skip to content

Nifty - Create Task Action #16593

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Nifty - Create Task Action #16593

wants to merge 3 commits into from

Conversation

michelle0927
Copy link
Collaborator

@michelle0927 michelle0927 commented May 8, 2025

Resolves #16483

Summary by CodeRabbit

  • New Features

    • Added the ability to create tasks with support for specifying milestones and task groups.
    • Enhanced milestone and task group selection options when creating or managing tasks.
  • Improvements

    • Standardized labeling for IDs and improved descriptions for consistency across the app.
    • Improved filtering and selection of milestones and task groups based on project context.
  • Updates

    • Updated the app and action versions for better tracking and compatibility.
    • Upgraded internal dependencies for improved stability.

Copy link

vercel bot commented May 8, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Ignored (Inspect) Visit Preview May 8, 2025 9:07pm
pipedream-docs ⬜️ Ignored (Inspect) May 8, 2025 9:07pm
pipedream-docs-redirect-do-not-edit ⬜️ Ignored (Inspect) May 8, 2025 9:07pm

Copy link
Contributor

coderabbitai bot commented May 8, 2025

"""

Walkthrough

A new "Create Task" action has been added for the Nifty platform, including properties and API calls for task creation. Supporting updates were made to the Nifty app module to handle milestones and task groups, and to standardize property labels. Several components had their version numbers incremented, and the package version and dependency were updated.

Changes

File(s) Change Summary
components/nifty/actions/create-task/create-task.mjs New action module for creating tasks in Nifty, with defined properties and API call logic.
components/nifty/nifty.app.mjs Added properties and methods for milestones and task groups, standardized label formatting, and improved option fetching.
components/nifty/actions/assign-task/assign-task.mjs
components/nifty/actions/create-message/create-message.mjs
components/nifty/actions/create-project/create-project.mjs
components/nifty/sources/new-message-posted/new-message-posted.mjs
components/nifty/sources/new-task-created/new-task-created.mjs
Incremented version numbers in exported objects; no logic or structural changes.
components/nifty/package.json Updated package version and upgraded @pipedream/platform dependency.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant CreateTaskAction
    participant NiftyApp
    participant NiftyAPI

    User->>CreateTaskAction: Provide task details (project, group, etc.)
    CreateTaskAction->>NiftyApp: Call createTask with provided details
    NiftyApp->>NiftyAPI: POST /tasks with task data
    NiftyAPI-->>NiftyApp: Respond with created task info
    NiftyApp-->>CreateTaskAction: Return task info
    CreateTaskAction-->>User: Output summary and full response
Loading

Assessment against linked issues

Objective Addressed Explanation
Implement "Create Task" action for Nifty (#16483)

Poem

A hop and a skip, a task to create,
With milestones and groups, we now integrate!
Version bumps abound, dependencies too,
Nifty grows stronger—there’s more we can do!
🐇✨ Tasks are now easy, just give us a try,
As we leap through your workflow, oh my!
"""

Tip

⚡️ Faster reviews with caching
  • CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.

Enjoy the performance boost—your workflow just got faster.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4b1d565 and 6b1e561.

📒 Files selected for processing (1)
  • components/nifty/actions/create-task/create-task.mjs (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • components/nifty/actions/create-task/create-task.mjs
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Lint Code Base
  • GitHub Check: Verify TypeScript components
✨ Finishing Touches
  • 📝 Generate Docstrings

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 (3)
components/nifty/actions/create-task/create-task.mjs (2)

10-92: Props are well-defined but contain minor typos.

The properties are comprehensive and appropriately structured with proper types, labels, and descriptions. Dynamic context filtering is correctly implemented for dependent props.

Fix these minor typos:

-      description: "An array of assignee IDs to assigne to the task",
+      description: "An array of assignee IDs to assign to the task",
-      description: "An array of labels to add to the tasK",
+      description: "An array of labels to add to the task",

64-75: Consider adding date format validation.

While the description indicates ISO-8601 format for dates, there's no validation to ensure user input follows this format, which could lead to API errors.

Consider adding validation before submitting:

    dueDate: {
      type: "string",
      label: "Due Date",
      description: "Due date of the task in ISO-8601 format",
      optional: true,
+     validate: (value) => {
+       if (!value) return true;
+       const regex = /^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(.\d{3})?(Z|[+-]\d{2}:\d{2})?)?$/;
+       if (!regex.test(value)) {
+         return "Please enter a valid ISO-8601 date format (e.g., 2023-05-25 or 2023-05-25T14:30:00Z)";
+       }
+       return true;
+     },
    },

Apply similar validation to the startDate property as well.

components/nifty/nifty.app.mjs (1)

134-158: Consider adding error handling for taskGroupId options.

The taskGroupId property filters milestones for those with a task_group property, but doesn't handle the case where no milestones have task groups.

Consider adding a fallback message when no task groups are found:

        return items
          .filter(({ task_group }) => task_group )
+         .map(({
            task_group: value, name: label,
          }) => ({
            label,
            value,
-         }));
+         })) || [{
+           label: "No task groups found in this project",
+           value: "",
+           disabled: true,
+         }];
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4b5a9bf and 4b1d565.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (8)
  • components/nifty/actions/assign-task/assign-task.mjs (1 hunks)
  • components/nifty/actions/create-message/create-message.mjs (1 hunks)
  • components/nifty/actions/create-project/create-project.mjs (1 hunks)
  • components/nifty/actions/create-task/create-task.mjs (1 hunks)
  • components/nifty/nifty.app.mjs (9 hunks)
  • components/nifty/package.json (2 hunks)
  • components/nifty/sources/new-message-posted/new-message-posted.mjs (1 hunks)
  • components/nifty/sources/new-task-created/new-task-created.mjs (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (4)
  • GitHub Check: pnpm publish
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Lint Code Base
🔇 Additional comments (14)
components/nifty/actions/assign-task/assign-task.mjs (1)

7-7: Bump action version for Assign Task
Updated version to "0.0.2" to stay consistent with the coordinated Nifty release. No other functional or structural changes observed.

components/nifty/sources/new-task-created/new-task-created.mjs (1)

9-9: Bump source version for New Task Created
Version updated to "0.0.2" in line with other component releases. No logic changes detected.

components/nifty/actions/create-project/create-project.mjs (1)

10-10: Bump action version for Create Project
Version incremented to "0.0.2" to match the release across Nifty modules. Implementation remains unchanged.

components/nifty/sources/new-message-posted/new-message-posted.mjs (1)

9-9: Bump source version for New Message Posted
Updated to "0.0.2" for consistency with the Nifty integration’s coordinated version updates. No other modifications noted.

components/nifty/actions/create-message/create-message.mjs (1)

8-8: Bump action version for Create Message
Version updated to "0.0.2" to align with the broader Nifty release. The rest of the action code is unaffected.

components/nifty/package.json (2)

3-3: Version update is appropriate for the new feature.

Bumping the package version from 0.1.0 to 0.2.0 aligns with semantic versioning principles for adding a new "Create Task" action without breaking existing functionality.


16-16: Platform dependency update looks good.

The significant update from ^1.5.1 to ^3.0.3 for @pipedream/platform should provide access to newer features and improvements needed for the new functionality.

components/nifty/actions/create-task/create-task.mjs (2)

1-9: Well-structured component setup.

The action is properly defined with appropriate metadata, version, and documentation link.


93-111: Implementation is clean and follows best practices.

The run method correctly calls the app's createTask method, exports a summary message, and returns the complete response object.

components/nifty/nifty.app.mjs (5)

10-10: Good standardization of property labels and descriptions.

The changes from "Id" to "ID" in labels and removal of trailing periods in descriptions improve consistency throughout the codebase.

Also applies to: 33-34, 48-49, 68-69, 91-92


110-133: Well-implemented milestoneId property.

The new milestoneId property is correctly defined with appropriate options method that filters items by projectId.


169-171: Consistent parameter destructuring improvements.

The updates to parameter destructuring formats make the code more consistent across all methods.

Also applies to: 246-247, 262-263


226-231: Correctly implemented listMilestones method.

The new method follows the established pattern of other list methods in the codebase.


277-283: Correctly implemented createTask method.

The new method follows the established pattern of other creation methods and properly supports the new "Create Task" action.

Copy link
Collaborator

@jcortes jcortes left a 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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ACTIONS] Nifty - Task actions
2 participants