| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: c5034a4c-7db3-4e86-8454-ad76a12e0b78 📥 CommitsReviewing files that changed from the base of the PR and between a5b47ab and db1b471. 📒 Files selected for processing (2)
📝 Walkthrough WalkthroughAdds WorkItemDependencies and WorkItemCustomRelations API client classes with list, create, and remove methods. New Pydantic models define request/response shapes for both relation types. Both clients are wired into WorkItems.__init__. An optional level field is added to work item type request models. Updates WorkItemRelationDefinitions.list() to support pagination via per_page and cursor parameters. Integration tests cover dependency and custom relation endpoints with fixtures. The WorkItems.search() method parameter key is updated from q to search. ChangesWork Item Dependencies and Custom Relations
Sequence Diagram(s)sequenceDiagram
participant Client as PlaneClient
participant WorkItems
participant Deps as WorkItemDependencies
participant CRel as WorkItemCustomRelations
participant API as Plane HTTP API
rect rgba(100, 149, 237, 0.5)
note over Client,API: Dependency creation and listing
Client->>WorkItems: work_items.dependencies.create(slug, project_id, item_id, data)
WorkItems->>Deps: create(slug, project_id, item_id, data)
Deps->>API: POST /workspaces/{slug}/projects/{project_id}/issues/{item_id}/issue-relations/
API-->>Deps: [{work_item, relation_type}, ...]
Deps-->>Client: list[WorkItemWithRelationType]
end
rect rgba(144, 238, 144, 0.5)
note over Client,API: Custom relation listing and creation
Client->>WorkItems: work_items.custom_relations.list(slug, project_id, item_id)
WorkItems->>CRel: list(slug, project_id, item_id)
CRel->>API: GET /workspaces/{slug}/projects/{project_id}/issues/{item_id}/issue-relation/
API-->>CRel: {outward_label: [...], inward_label: [...]}
CRel-->>Client: dict[str, list[WorkItemWithRelationType]]
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem🚥 Pre-merge checks | ✅ 5 ✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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. ❤️ ShareComment @coderabbitai help to get the list of available commands and usage tips. |
Sorry, something went wrong.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agentsVerify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. Inline comments: In `@tests/unit/test_work_item_relations.py`: - Around line 74-198: The tests in both TestWorkItemDependencies (lines 74-198) and TestWorkItemCustomRelations (lines 204-350) depend on implicit execution order because earlier tests create shared state (dependencies or relations) that later tests assume exists. To fix this, either: (1) make each test independent by having it create the necessary dependencies/relations at the start and clean them up at the end (as done in test_create_all_dependency_types which creates and immediately removes), or (2) add pytest-order decorator (e.g., `@pytest.mark.order`(N)) to enforce the current sequence. For TestWorkItemDependencies specifically, refactor test_list_dependencies_after_create, test_list_reverse_dependency, and test_remove_dependency to each set up their own blocking dependency before testing rather than relying on prior tests. Apply the same approach to TestWorkItemCustomRelations for its affected test methods.
Fix all unresolved CodeRabbit comments on this PR:
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: fe6c0834-d08c-4296-b70a-ee9bf2d34375
📥 CommitsReviewing files that changed from the base of the PR and between 491a923 and 57036aa.
📒 Files selected for processing (6)
Sorry, something went wrong.
There was a problem hiding this comment.
plane/models/work_item_relation_definitions.py (1)🤖 Prompt for all review comments with AI agents54-59: 💤 Low value
Redundant model_config declaration.
PaginatedResponse (per plane/models/pagination.py:4-19) already declares model_config = ConfigDict(extra="allow", populate_by_name=True). Pydantic subclasses inherit parent config, so this redeclaration is unnecessary.
♻️ Suggested simplification🤖 Prompt for AI Agentsclass PaginatedWorkItemRelationDefinitionResponse(PaginatedResponse): """Paginated response for work item relation definitions.""" - model_config = ConfigDict(extra="allow", populate_by_name=True) - results: list[WorkItemRelationDefinition]Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@plane/models/work_item_relation_definitions.py` around lines 54 - 59, The PaginatedWorkItemRelationDefinitionResponse class has a redundant model_config declaration that duplicates the parent PaginatedResponse class configuration. Since Pydantic subclasses inherit parent model_config automatically, remove the model_config = ConfigDict(extra="allow", populate_by_name=True) line from PaginatedWorkItemRelationDefinitionResponse and keep only the class docstring and the results field definition.
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. Nitpick comments: In `@plane/models/work_item_relation_definitions.py`: - Around line 54-59: The PaginatedWorkItemRelationDefinitionResponse class has a redundant model_config declaration that duplicates the parent PaginatedResponse class configuration. Since Pydantic subclasses inherit parent model_config automatically, remove the model_config = ConfigDict(extra="allow", populate_by_name=True) line from PaginatedWorkItemRelationDefinitionResponse and keep only the class docstring and the results field definition.
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 5dfe6b3f-9dbd-48b3-b1b0-e52d04a64ed6
📥 CommitsReviewing files that changed from the base of the PR and between 57036aa and ecf5ba0.
📒 Files selected for processing (2)
Sorry, something went wrong.
…endency management
…into chore-custom-relations
…n work item model
| Back | FazBrowse Home | New Git URL |
Description:
Summary
Adds two new sub-resources on WorkItems to support the dedicated dependency and custom-relation endpoints introduced in the API:
New models (plane/models/work_items.py)
New API resources
Summary by CodeRabbit