Skip to content

feat: add wrike app#228

Merged
thisisfixer merged 1 commit intomainfrom
feature/add-wrike-app
Apr 18, 2025
Merged

feat: add wrike app#228
thisisfixer merged 1 commit intomainfrom
feature/add-wrike-app

Conversation

@GreenOilyChicken
Copy link
Contributor

@GreenOilyChicken GreenOilyChicken commented Apr 18, 2025

Summary

General introduction about this PR and this APP

APP_URL: https://www.wrike.com/
APP_API_DOCS_URL: https://developers.wrike.com

Integrated API

WRIKE__QUERY_TASKS
WRIKE__CREATE_TASK
WRIKE__MODIFY_TASKS
WRIKE__GET_FOLDER_TREE
WRIKE__CREATE_FOLDER

Fuzzy Tests

docker compose exec runner python -m aipolabs.cli.aipolabs fuzzy-test-function-execution --function-name WRIKE__QUERY_TASKS --aipolabs-api-key c8fb5f38c95df95aee8eeca5583ef052abe534b818de4140f940db816258cfa4 --linked-account-owner-id 2598e50b-4046-45d3-822b-01bbaf3dbfc7 --prompt "Get all tasks."
docker compose exec runner python -m aipolabs.cli.aipolabs fuzzy-test-function-execution --function-name WRIKE__CREATE_TASK --aipolabs-api-key c8fb5f38c95df95aee8eeca5583ef052abe534b818de4140f940db816258cfa4 --linked-account-owner-id 2598e50b-4046-45d3-822b-01bbaf3dbfc7 --prompt "Create a new task in the folder with id IEAGSXWVI7777777,responsibles is KUAUV5H5,customFields is IEAGSXWVJUAIF7LB."
docker compose exec runner python -m aipolabs.cli.aipolabs fuzzy-test-function-execution --function-name WRIKE__MODIFY_TASKS --aipolabs-api-key c8fb5f38c95df95aee8eeca5583ef052abe534b818de4140f940db816258cfa4 --linked-account-owner-id 2598e50b-4046-45d3-822b-01bbaf3dbfc7 --prompt "Modify the task with id IEAGSXWVKRQ7PTPF,customFields is IEAGSXWVJUAIF7LB."
docker compose exec runner python -m aipolabs.cli.aipolabs fuzzy-test-function-execution --function-name WRIKE__GET_FOLDER_TREE --aipolabs-api-key c8fb5f38c95df95aee8eeca5583ef052abe534b818de4140f940db816258cfa4 --linked-account-owner-id 2598e50b-4046-45d3-822b-01bbaf3dbfc7 --prompt "Get all folders and projects from Wrike."
docker compose exec runner python -m aipolabs.cli.aipolabs fuzzy-test-function-execution --function-name WRIKE__CREATE_FOLDER --aipolabs-api-key c8fb5f38c95df95aee8eeca5583ef052abe534b818de4140f940db816258cfa4 --linked-account-owner-id 2598e50b-4046-45d3-822b-01bbaf3dbfc7 --prompt "Create a new folder in the IEAGSXWVI7777777,customFields is IEAGSXWVJUAIF7LB."

Images

WRIKE__QUERY_TASKS
WRIKE__QUERY_TASKS

WRIKE__CREATE_TASK
WRIKE__CREATE_TASK

WRIKE__MODIFY_TASKS
WRIKE__MODIFY_TASKS

WRIKE__GET_FOLDER_TREE
WRIKE__GET_FOLDER_TREE

WRIKE__CREATE_FOLDER
WRIKE__CREATE_FOLDER

Summary by CodeRabbit

  • New Features
    • Added Wrike integration, enabling users to manage tasks and folders directly within the app. Users can query, create, and modify tasks, as well as browse and create folders and projects.
  • Chores
    • Introduced new configuration and API function definitions for Wrike, supporting project management, task tracking, collaboration, and workflow automation.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Apr 18, 2025

Walkthrough

This update introduces Wrike integration into the system by adding configuration and function definition files. The app configuration file specifies Wrike's metadata, integration details, and security requirements. The functions definition file outlines REST API operations for managing tasks and folders within Wrike, including querying, creating, and updating tasks, as well as retrieving and creating folders. All API endpoints, parameters, and expected behaviors are explicitly defined, supporting structured interaction with Wrike's v4 API.

Changes

File(s) Change Summary
apps/wrike/app.json Added Wrike app configuration file with metadata, provider info, security scheme, categories, and visibility.
apps/wrike/functions.json Added function definitions for Wrike REST API: querying, creating, modifying tasks; retrieving, creating folders.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant System
    participant WrikeAPI

    User->>System: Initiate Wrike task or folder operation
    System->>WrikeAPI: Send API request (query/create/modify task or folder)
    WrikeAPI-->>System: Return response (tasks/folders data)
    System-->>User: Present results or confirmation
Loading

Poem

In the meadow of tasks, where projects grow bright,
Wrike hops in with folders, making workflows light.
With queries and creations, and updates galore,
The rabbit now manages so much more!
API keys in paw, off to automate—
Productivity blooms as we collaborate!
🐇✨


📜 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 da3acc5 and 167dcb6.

📒 Files selected for processing (2)
  • apps/wrike/app.json (1 hunks)
  • apps/wrike/functions.json (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: test
  • GitHub Check: Format & Lint

Note

🎁 Summarized by CodeRabbit Free

Your organization has reached its limit of developer seats under the Pro Plan. For new users, CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please add seats to your subscription by visiting https://app.coderabbit.ai/login.If you believe this is a mistake and have available seats, please assign one to the pull request author through the subscription management page using the link above.

🪧 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.

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 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.

@github-actions
Copy link

ACI Integration Code Review (Sonnet 3.7) - 2025-04-18 14:28:25.627

This review analyzes changes to integration files in the app/ directories.

Code Review: Wrike Integration

Issues and Recommendations

1. WRIKE__QUERY_TASKS Function

File: apps/wrike/functions.json (lines 1-88)
Issue: The required field for query parameters is empty, but according to the function's purpose, some parameters should be required to make a meaningful query.
Suggestion: At least one of folderId, spaceId, or taskIds should be required to make a meaningful query. Update the required array:

"required": ["folderId", "spaceId", "taskIds"],

with a note that at least one of these parameters must be provided.

2. WRIKE__GET_FOLDER_TREE Function

File: apps/wrike/functions.json (lines 302-367)
Issue: The path parameters are defined incorrectly. The folderId and spaceId are defined as path parameters, but the protocol_data path is just "/folders" without any path parameters.
Suggestion: Move these parameters to the query object since they appear to be query parameters rather than path parameters:

"query": {
    "type": "object",
    "description": "Query parameters for filtering folders",
    "properties": {
        "folderId": {
            "type": "string",
            "description": "ID of the parent folder to retrieve child folders from"
        },
        "spaceId": {
            "type": "string",
            "description": "ID of the space to retrieve folders from"
        },
        "fields": {
            "type": "array",
            "description": "List of fields to include in the response",
            "items": {
                "type": "string"
            }
        }
    },
    "required": [],
    "visible": ["folderId", "spaceId", "fields"],
    "additionalProperties": false
}

3. Status Field Descriptions

File: apps/wrike/functions.json (multiple locations)
Issue: The status field descriptions in multiple functions (lines 37, 130, 239) use commas to separate possible values, which is not ideal for readability.
Suggestion: Use a more structured format for the status options:

"status": {
    "type": "string",
    "description": "Filter tasks by status",
    "enum": ["Active", "Completed", "Deferred", "Cancelled"]
}

4. Importance Field

File: apps/wrike/functions.json (multiple locations)
Issue: The importance field (lines 41, 134, 243) lacks enumeration of possible values.
Suggestion: Add possible values to the description or use an enum:

"importance": {
    "type": "string",
    "description": "Importance level of the task",
    "enum": ["High", "Normal", "Low"]
}

(Note: Verify the actual valid values from the Wrike API documentation)

5. Date Format Specification

File: apps/wrike/functions.json (lines 149-150, 258-259)
Issue: The date fields use "format": "date", but don't specify the expected date format in the description.
Suggestion: Add the expected date format to the description:

"start": {
    "type": "string",
    "format": "date",
    "description": "Start date of the task (format: YYYY-MM-DD)"
}

Summary of Changes and Impact

This PR introduces a new Wrike integration with five key functions:

  1. Query tasks
  2. Create tasks
  3. Modify tasks
  4. Get folder tree
  5. Create folders

The integration covers the core functionality of Wrike's task and folder management capabilities, allowing users to interact with Wrike projects programmatically. The implementation follows the standard structure for REST API integrations, with proper separation of path, query, and body parameters.

The changes have a positive impact on the platform's capabilities by adding a popular project management tool to the available integrations. The functions are well-documented with clear descriptions and parameter details.

Overall Assessment

Rating: Acceptable

The integration is generally well-implemented with comprehensive function specifications. The issues identified are relatively minor and mostly related to parameter organization and documentation clarity rather than fundamental problems with the integration.

Next Steps for the Developer

  1. Review and implement the suggested changes for required fields in query parameters
  2. Fix the parameter organization in the GET_FOLDER_TREE function
  3. Improve the documentation of enum values for status and importance fields
  4. Add specific date format information to date fields
  5. Consider adding additional functions for other common Wrike operations (e.g., comments, attachments) in future updates
  6. Add examples in the descriptions to help users understand how to use the parameters correctly

Once these changes are made, the integration will be more robust and user-friendly, providing a better experience for users interacting with Wrike through this API.

@thisisfixer thisisfixer merged commit 03a5999 into main Apr 18, 2025
4 checks passed
@thisisfixer thisisfixer deleted the feature/add-wrike-app branch April 18, 2025 15:01
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.

2 participants